Module script::dom::bindings::utils

source ·
Expand description

Various utilities to glue JavaScript and the DOM implementation together.

Structs

The struct that holds inheritance information for DOM object reflectors.
The JSClass used for DOM object reflectors.
Static data associated with a global object.
Proxy handler for a WindowProxy.

Constants

The index of the slot that contains a reference to the ProtoOrIfaceArray.
The index of the slot where the object holder of that interface’s unforgeable members are defined.
The flag set on the JSClasses for DOM global objects.

Traits

Functions

call_setter 🔒
Creates a Float32 array
Deletes the property id from object.
Enumerate lazy properties of a global object.
Drop the resources held by reserved slots of a global object
Find the enum equivelent of a string given by v in pairs. Returns Err(()) on JSAPI failure (there is a pending exception), and Ok((None, value)) if there was no matching string.
generic_call 🔒
Generic getter of IDL interface.
Generic lenient getter of IDL interface.
Generic lenient setter of IDL interface.
Generic method of IDL interface.
Generic setter of IDL interface.
Get an array index from the given jsid. Returns None if the given jsid is not an integer.
Get the property with name property from object. Returns Err(()) on JSAPI failure (there is a pending exception), and Ok(false) if there was no property with the given name.
Gets the property id on proxy’s prototype. If it exists, *found is set to true and *vp to the value, otherwise *found is set to false.
Returns the ProtoOrIfaceArray for the given global object. Fails if global is not a DOM global object.
Returns whether proxy has a property id on its prototype.
Returns wether obj is a platform object using dynamic unwrap https://heycam.github.io/webidl/#dfn-platform-object
Returns wether obj is a platform object using static unwrap https://heycam.github.io/webidl/#dfn-platform-object
Resolve a lazy global property, for interface objects and named constructors.
Set the property with name property from object. Returns Err(()) on JSAPI failure, or null object, and Ok(()) otherwise
Returns a JSVal representing a frozen array of ports
Trace the resources held by reserved slots of a global object

Type Definitions

An array of *mut JSObject of size PROTO_OR_IFACE_LENGTH.