StructsΒ§
- DOMClass
- The struct that holds inheritance information for DOM object reflectors.
- DOMJS
Class - The JSClass used for DOM object reflectors.
ConstantsΒ§
- DOM_
PROTOTYPE_ πSLOT - The index of the slot that contains a reference to the ProtoOrIfaceArray.
- DOM_
PROTO_ πUNFORGEABLE_ HOLDER_ SLOT - The index of the slot where the object holder of that interfaceβs unforgeable members are defined.
- JSCLASS_
DOM_ πGLOBAL - The flag set on the
JSClass
es for DOM global objects.
TraitsΒ§
- AsCChar
PtrPtr π - AsVoid
Ptr
FunctionsΒ§
- call_
setter π β - delete_
property_ π βby_ id - Deletes the property
id
fromobject
. - enumerate_
global π β - Enumerate lazy properties of a global object. Modeled after https://github.com/mozilla/gecko-dev/blob/3fd619f47/dom/bindings/BindingUtils.cpp#L2814
- enumerate_
window π β - Enumerate lazy properties of a global object that is a Window. https://github.com/mozilla/gecko-dev/blob/3fd619f47/dom/base/nsGlobalWindowInner.cpp#3297
- exception_
to_ π βpromise - Coverts exception to promise rejection
- find_
enum_ π βvalue - Find the enum equivelent of a string given by
v
inpairs
. ReturnsErr(())
on JSAPI failure (there is a pending exception), andOk((None, value))
if there was no matching string. - generic_
call π β - generic_
getter π β - Generic getter of IDL interface.
- generic_
lenient_ π βgetter - Generic lenient getter of IDL interface.
- generic_
lenient_ π βsetter - Generic lenient setter of IDL interface.
- generic_
method π β - Generic method of IDL interface.
- generic_
setter π β - Generic setter of IDL interface.
- generic_
static_ π βpromise_ method - https://searchfox.org/mozilla-central/rev/7279a1df13a819be254fd4649e07c4ff93e4bd45/dom/bindings/BindingUtils.cpp#3300
- get_
array_ index_ from_ id - Get an array index from the given
jsid
. ReturnsNone
if the givenjsid
is not an integer. - get_
dictionary_ βproperty - Get the property with name
property
fromobject
. ReturnsErr(())
on JSAPI failure (there is a pending exception), andOk(false)
if there was no property with the given name. - get_
property_ π βon_ prototype - Gets the property
id
onproxy
βs prototype. If it exists,*found
is set to true and*vp
to the value, otherwise*found
is set to false. - get_
proto_ π βor_ iface_ array - Returns the ProtoOrIfaceArray for the given global object.
Fails if
global
is not a DOM global object. - has_
property_ βon_ prototype - Computes whether
proxy
has a propertyid
on its prototype and stores the result infound
. - latin1_
bytes_ π βfrom_ id - Returns a slice of bytes corresponding to the bytes in the provided string id. Returns an error if the id is not a string, or the string contains non-latin1 characters.
- may_
resolve_ π βglobal - Returns true if the resolve hook for this global may resolve the provided id. https://searchfox.org/mozilla-central/rev/f3c8c63a097b61bb1f01e13629b9514e09395947/dom/bindings/BindingUtils.cpp#2809 https://searchfox.org/mozilla-central/rev/f3c8c63a097b61bb1f01e13629b9514e09395947/js/public/Class.h#283-291
- may_
resolve_ π βwindow - Returns true if the resolve hook for this window may resolve the provided id. https://searchfox.org/mozilla-central/rev/f3c8c63a097b61bb1f01e13629b9514e09395947/dom/base/nsGlobalWindowInner.cpp#3275 https://searchfox.org/mozilla-central/rev/f3c8c63a097b61bb1f01e13629b9514e09395947/js/public/Class.h#283-291
- resolve_
global π β - Resolve a lazy global property, for interface objects and named constructors.
- resolve_
window π β - Resolve a lazy global property for a Window global.
- set_
dictionary_ βproperty - Set the property with name
property
fromobject
. ReturnsErr(())
on JSAPI failure, or null object, and Ok(()) otherwise - trace_
global π β - Trace the resources held by reserved slots of a global object
Type AliasesΒ§
- Proto
OrIface Array - An array of *mut JSObject of size PROTO_OR_IFACE_LENGTH.