|
@@ -5195,11 +5195,11 @@ selector: "defaultEnvironment",
|
|
|
protocol: "defaults",
|
|
protocol: "defaults",
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
args: [],
|
|
args: [],
|
|
|
-source: "defaultEnvironment\x0a\x09\x22If helios is loaded from within a frame, answer the parent window environment\x22\x0a\x09\x0a\x09| parent parentSmalltalkGlobals |\x0a\x09\x0a\x09parent := window opener ifNil: [ window parent ].\x0a\x09parent ifNil: [ ^ Environment new ].\x0a\x09\x0a\x09parentSmalltalkGlobals := ((parent at: 'requirejs') value: 'amber/boot') at: 'globals'.\x0a\x09parentSmalltalkGlobals ifNil: [ ^ Environment new ].\x0a\x09\x0a\x09self handleLossOfEnvironmentWithParent: parent.\x0a\x09\x0a\x09^ (parentSmalltalkGlobals at: 'Environment') new",
|
|
|
|
|
-referencedClasses: ["Environment"],
|
|
|
|
|
|
|
+source: "defaultEnvironment\x0a\x09\x22If helios is loaded from within a frame, answer the parent window environment\x22\x0a\x09\x0a\x09| parent parentSmalltalkGlobals |\x0a\x09\x0a\x09PlatformDom isFeasible ifFalse: [ ^ Environment new ].\x0a\x09parent := window opener ifNil: [ window parent ].\x0a\x09parent ifNil: [ ^ Environment new ].\x0a\x09\x0a\x09parentSmalltalkGlobals := ((parent at: 'requirejs') value: 'amber/boot') at: 'globals'.\x0a\x09parentSmalltalkGlobals ifNil: [ ^ Environment new ].\x0a\x09\x0a\x09self handleLossOfEnvironmentWithParent: parent.\x0a\x09\x0a\x09^ (parentSmalltalkGlobals at: 'Environment') new",
|
|
|
|
|
+referencedClasses: ["PlatformDom", "Environment"],
|
|
|
//>>excludeEnd("ide");
|
|
//>>excludeEnd("ide");
|
|
|
pragmas: [],
|
|
pragmas: [],
|
|
|
-messageSends: ["ifNil:", "opener", "parent", "new", "at:", "value:", "handleLossOfEnvironmentWithParent:"]
|
|
|
|
|
|
|
+messageSends: ["ifFalse:", "isFeasible", "new", "ifNil:", "opener", "parent", "at:", "value:", "handleLossOfEnvironmentWithParent:"]
|
|
|
}, function ($methodClass){ return function (){
|
|
}, function ($methodClass){ return function (){
|
|
|
var self=this,$self=this;
|
|
var self=this,$self=this;
|
|
|
var parent,parentSmalltalkGlobals;
|
|
var parent,parentSmalltalkGlobals;
|
|
@@ -5207,6 +5207,13 @@ var parent,parentSmalltalkGlobals;
|
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
|
var $1,$2,$3;
|
|
var $1,$2,$3;
|
|
|
|
|
+if(!$core.assert($recv($globals.PlatformDom)._isFeasible())){
|
|
|
|
|
+return [$recv($globals.Environment)._new()
|
|
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
|
+,$ctx1.sendIdx["new"]=1
|
|
|
|
|
+//>>excludeEnd("ctx");
|
|
|
|
|
+][0];
|
|
|
|
|
+}
|
|
|
$1=$recv(window)._opener();
|
|
$1=$recv(window)._opener();
|
|
|
if($1 == null || $1.a$nil){
|
|
if($1 == null || $1.a$nil){
|
|
|
parent=$recv(window)._parent();
|
|
parent=$recv(window)._parent();
|
|
@@ -5217,7 +5224,7 @@ $2=parent;
|
|
|
if($2 == null || $2.a$nil){
|
|
if($2 == null || $2.a$nil){
|
|
|
return [$recv($globals.Environment)._new()
|
|
return [$recv($globals.Environment)._new()
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-,$ctx1.sendIdx["new"]=1
|
|
|
|
|
|
|
+,$ctx1.sendIdx["new"]=2
|
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
|
][0];
|
|
][0];
|
|
|
} else {
|
|
} else {
|
|
@@ -5236,7 +5243,7 @@ $3=parentSmalltalkGlobals;
|
|
|
if($3 == null || $3.a$nil){
|
|
if($3 == null || $3.a$nil){
|
|
|
return [$recv($globals.Environment)._new()
|
|
return [$recv($globals.Environment)._new()
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-,$ctx1.sendIdx["new"]=2
|
|
|
|
|
|
|
+,$ctx1.sendIdx["new"]=3
|
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
|
][0];
|
|
][0];
|
|
|
} else {
|
|
} else {
|