Module utils

Module utils 

Source
Expand description

Various utilities to glue JavaScript and the DOM implementation together.

Modulesยง

call_policies ๐Ÿ”’

Structsยง

CallPolicyInfo ๐Ÿ”’
Controls various details of an IDL operation, such as whether a [LegacyLenientThis] attribute is specified and preconditions that affect the outcome of the โ€œperform a security checkโ€ steps.
DOMClass ๐Ÿ”’
The struct that holds inheritance information for DOM object reflectors.
DOMJSClass ๐Ÿ”’
The JSClass used for DOM object reflectors.
GlobalStaticData ๐Ÿ”’
Static data associated with a global object.

Constantsยง

DOM_CALLBACKS ๐Ÿ”’

Traitsยง

CallPolicy ๐Ÿ”’

Functionsยง

define_all_exposed_interfaces ๐Ÿ”’
Eagerly define all relevant WebIDL interface constructors on the provided global object.
define_dictionary_property ๐Ÿ”’
Define an own enumerable data property with name property on object. Returns Err(()) on JSAPI failure, or null object, and Ok(()) otherwise.
get_array_index_from_id ๐Ÿ”’
Get an array index from the given jsid. Returns None if the given jsid is not an integer.
get_dictionary_property ๐Ÿ”’ โš 
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.
has_own_property ๐Ÿ”’
Checks whether object has an own property named property. Returns Err(()) on JSAPI failure (there is a pending exception), and Ok(false) for null objects or when the property is not own.
has_property_on_prototype ๐Ÿ”’ โš 
Computes whether proxy has a property id on its prototype and stores the result in found.
instance_class_has_proto_at_depth ๐Ÿ”’ โš 
instance_class_is_error ๐Ÿ”’ โš 
https://searchfox.org/mozilla-central/rev/c18faaae88b30182e487fa3341bc7d923e22f23a/xpcom/base/CycleCollectedJSRuntime.cpp#792
is_platform_object ๐Ÿ”’
is_platform_object_dynamic ๐Ÿ”’
Returns wether obj is a platform object using dynamic unwrap https://heycam.github.io/webidl/#dfn-platform-object
is_platform_object_static ๐Ÿ”’
Returns wether obj is a platform object using static unwrap https://heycam.github.io/webidl/#dfn-platform-object
set_dictionary_property ๐Ÿ”’
Set the property with name property from object. Returns Err(()) on JSAPI failure, or null object, and Ok(()) otherwise
to_frozen_array ๐Ÿ”’
Returns a JSVal representing the frozen JavaScript array

Type Aliasesยง

ProtoOrIfaceArray ๐Ÿ”’
An array of *mut JSObject of size PROTO_OR_IFACE_LENGTH.