java.lang.Object | |
↳ | com.google.gwt.core.client.JavaScriptObject |
Known Direct Subclasses |
Known Indirect Subclasses |
An opaque handle to a native JavaScript object. A
JavaScriptObject
cannot be created directly.
JavaScriptObject
should be declared as the return type of a
JSNI method that returns native (non-Java) objects. A
JavaScriptObject
passed back into JSNI from Java becomes the
original object, and can be accessed in JavaScript as expected.
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Not directly instantiable.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
A helper method to enable cross-casting from any
JavaScriptObject
type to any other JavaScriptObject type. | |||||||||||
Returns a new array.
| |||||||||||
Returns an empty function.
| |||||||||||
Returns a new object.
| |||||||||||
Returns
true if the objects are JavaScript identical
(triple-equals). | |||||||||||
Uses a monotonically increasing counter to assign a hash code to the
underlying JavaScript object.
| |||||||||||
Call the toSource() on the JSO.
| |||||||||||
Makes a best-effort attempt to get a useful debugging string describing the
given JavaScriptObject.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Not directly instantiable. All subclasses must also define a protected, empty, no-arg constructor.
A helper method to enable cross-casting from any JavaScriptObject
type to any other JavaScriptObject
type.
Returns true
if the objects are JavaScript identical
(triple-equals).
Uses a monotonically increasing counter to assign a hash code to the underlying JavaScript object. Do not call this method on non-modifiable JavaScript objects. TODO: if the underlying object defines a 'hashCode' method maybe use that?
Makes a best-effort attempt to get a useful debugging string describing the given JavaScriptObject. In Production Mode with assertions disabled, this will either call and return the JSO's toString() if one exists, or just return "[JavaScriptObject]". In Development Mode, or with assertions enabled, some stronger effort is made to represent other types of JSOs, including inspecting for document nodes' outerHTML and innerHTML, etc.