Browse Source

JSObjectProxy class >> #newObject.

Herby Vojčík 3 years ago
parent
commit
3ac29556b0
2 changed files with 28 additions and 0 deletions
  1. 24 0
      lang/src/Kernel-Infrastructure.js
  2. 4 0
      lang/src/Kernel-Infrastructure.st

+ 24 - 0
lang/src/Kernel-Infrastructure.js

@@ -792,6 +792,30 @@ return self;
 }; }),
 $globals.JSObjectProxy.a$cls);
 
+$core.addMethod(
+$core.method({
+selector: "newObject",
+protocol: "accessing",
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "newObject\x0a\x09<inlineJS: 'return {}'>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [["inlineJS:", ["return {}"]]],
+messageSends: []
+}, function ($methodClass){ return function (){
+var self=this,$self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return {};
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"newObject",{})});
+//>>excludeEnd("ctx");
+}; }),
+$globals.JSObjectProxy.a$cls);
+
 $core.addMethod(
 $core.method({
 selector: "null",

+ 4 - 0
lang/src/Kernel-Infrastructure.st

@@ -187,6 +187,10 @@ isThenable
 
 !JSObjectProxy class methodsFor: 'accessing'!
 
+newObject
+	<inlineJS: 'return {}'>
+!
+
 null
 	<inlineJS: 'return null'>
 !