Amber has the following methods which can be used to call JS constructors that take arguments:
BlockClosure>>#newValue:
BlockClosure>>#newValue:value:
BlockClosure>>#newValue:value:value:
Examples:
new Foo(); // JS version Foo new. "Amber version" new Foo(1,2); // JS version Foo newValue: 1 value: 2. "Amber version"
This recipe was posted to the Amber mailinglist by Andy Bower.
Literal notation may be used for arguments.
More on Smalltalk and JavaScript
There was an error while loading. Please reload this page.