Support arbitrary protos when wrapping EventTarget objects.

This commit is contained in:
Josh Matthews 2023-05-25 23:59:02 -04:00
parent 4ee789a85c
commit d9600ff50f
8 changed files with 187 additions and 35 deletions

View file

@ -99,6 +99,9 @@ pub struct DOMClass {
/// derivedness.
pub interface_chain: [PrototypeList::ID; MAX_PROTO_CHAIN_LENGTH],
/// The last valid index of `interface_chain`.
pub depth: u8,
/// The type ID of that interface.
pub type_id: TopTypeId,
@ -112,6 +115,7 @@ unsafe impl Sync for DOMClass {}
/// The JSClass used for DOM object reflectors.
#[derive(Copy)]
#[repr(C)]
pub struct DOMJSClass {
/// The actual JSClass.
pub base: js::jsapi::JSClass,