Created
November 18, 2016 14:55
-
-
Save asajeffrey/df858a35c55978f464e8aefcb46a984e to your computer and use it in GitHub Desktop.
Output of servo codegen with Document made weak referenceable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */ | |
#![allow(non_camel_case_types,non_upper_case_globals,unused_imports,unused_variables,unused_assignments)] | |
use core::nonzero::NonZero; | |
use dom; | |
use dom::bindings; | |
use dom::bindings::callback::CallSetup; | |
use dom::bindings::callback::CallbackContainer; | |
use dom::bindings::callback::CallbackFunction; | |
use dom::bindings::callback::CallbackInterface; | |
use dom::bindings::callback::ExceptionHandling; | |
use dom::bindings::callback::wrap_call_this_object; | |
use dom::bindings::codegen::InterfaceObjectMap; | |
use dom::bindings::codegen::PrototypeList; | |
use dom::bindings::codegen::RegisterBindings; | |
use dom::bindings::codegen::UnionTypes; | |
use dom::bindings::constant::ConstantSpec; | |
use dom::bindings::constant::ConstantVal; | |
use dom::bindings::conversions::ConversionBehavior; | |
use dom::bindings::conversions::ConversionResult; | |
use dom::bindings::conversions::DOM_OBJECT_SLOT; | |
use dom::bindings::conversions::FromJSValConvertible; | |
use dom::bindings::conversions::IDLInterface; | |
use dom::bindings::conversions::StringificationBehavior; | |
use dom::bindings::conversions::ToJSValConvertible; | |
use dom::bindings::conversions::is_array_like; | |
use dom::bindings::conversions::native_from_handlevalue; | |
use dom::bindings::conversions::native_from_object; | |
use dom::bindings::conversions::private_from_object; | |
use dom::bindings::conversions::root_from_handleobject; | |
use dom::bindings::conversions::root_from_handlevalue; | |
use dom::bindings::conversions::root_from_object; | |
use dom::bindings::conversions::string_jsid_to_string; | |
use dom::bindings::error::Error; | |
use dom::bindings::error::Error::JSFailed; | |
use dom::bindings::error::ErrorResult; | |
use dom::bindings::error::Fallible; | |
use dom::bindings::error::throw_dom_exception; | |
use dom::bindings::guard::Condition; | |
use dom::bindings::guard::Guard; | |
use dom::bindings::interface::ConstructorClassHook; | |
use dom::bindings::interface::InterfaceConstructorBehavior; | |
use dom::bindings::interface::NonCallbackInterfaceObjectClass; | |
use dom::bindings::interface::create_callback_interface_object; | |
use dom::bindings::interface::create_global_object; | |
use dom::bindings::interface::create_interface_prototype_object; | |
use dom::bindings::interface::create_named_constructors; | |
use dom::bindings::interface::create_noncallback_interface_object; | |
use dom::bindings::interface::define_guarded_constants; | |
use dom::bindings::interface::define_guarded_methods; | |
use dom::bindings::interface::define_guarded_properties; | |
use dom::bindings::interface::is_exposed_in; | |
use dom::bindings::iterable::Iterable; | |
use dom::bindings::iterable::IteratorType; | |
use dom::bindings::js::JS; | |
use dom::bindings::js::Root; | |
use dom::bindings::js::RootedReference; | |
use dom::bindings::mozmap::MozMap; | |
use dom::bindings::namespace::NamespaceObjectClass; | |
use dom::bindings::namespace::create_namespace_object; | |
use dom::bindings::num::Finite; | |
use dom::bindings::proxyhandler; | |
use dom::bindings::proxyhandler::ensure_expando_object; | |
use dom::bindings::proxyhandler::fill_property_descriptor; | |
use dom::bindings::proxyhandler::get_expando_object; | |
use dom::bindings::proxyhandler::get_property_descriptor; | |
use dom::bindings::reflector::MutReflectable; | |
use dom::bindings::reflector::Reflectable; | |
use dom::bindings::str::ByteString; | |
use dom::bindings::str::DOMString; | |
use dom::bindings::str::USVString; | |
use dom::bindings::trace::JSTraceable; | |
use dom::bindings::trace::RootedTraceable; | |
use dom::bindings::utils::DOMClass; | |
use dom::bindings::utils::DOMJSClass; | |
use dom::bindings::utils::DOM_PROTO_UNFORGEABLE_HOLDER_SLOT; | |
use dom::bindings::utils::JSCLASS_DOM_GLOBAL; | |
use dom::bindings::utils::ProtoOrIfaceArray; | |
use dom::bindings::utils::enumerate_global; | |
use dom::bindings::utils::finalize_global; | |
use dom::bindings::utils::find_enum_string_index; | |
use dom::bindings::utils::generic_getter; | |
use dom::bindings::utils::generic_lenient_getter; | |
use dom::bindings::utils::generic_lenient_setter; | |
use dom::bindings::utils::generic_method; | |
use dom::bindings::utils::generic_setter; | |
use dom::bindings::utils::get_array_index_from_id; | |
use dom::bindings::utils::get_dictionary_property; | |
use dom::bindings::utils::get_property_on_prototype; | |
use dom::bindings::utils::get_proto_or_iface_array; | |
use dom::bindings::utils::has_property_on_prototype; | |
use dom::bindings::utils::is_platform_object; | |
use dom::bindings::utils::resolve_global; | |
use dom::bindings::utils::set_dictionary_property; | |
use dom::bindings::utils::trace_global; | |
use dom::bindings::utils::wrap_panic; | |
use dom::bindings::weakref::DOM_WEAK_SLOT; | |
use dom::bindings::weakref::WeakBox; | |
use dom::bindings::weakref::WeakReferenceable; | |
use dom::browsingcontext::BrowsingContext; | |
use dom::globalscope::GlobalScope; | |
use js; | |
use js::JSCLASS_GLOBAL_SLOT_COUNT; | |
use js::JSCLASS_IS_DOMJSCLASS; | |
use js::JSCLASS_IS_GLOBAL; | |
use js::JSCLASS_RESERVED_SLOTS_MASK; | |
use js::JS_CALLEE; | |
use js::error::throw_type_error; | |
use js::glue::AppendToAutoIdVector; | |
use js::glue::CallJitGetterOp; | |
use js::glue::CallJitMethodOp; | |
use js::glue::CallJitSetterOp; | |
use js::glue::CreateProxyHandler; | |
use js::glue::GetProxyPrivate; | |
use js::glue::NewProxyObject; | |
use js::glue::ProxyTraps; | |
use js::glue::RUST_JSID_IS_STRING; | |
use js::glue::RUST_SYMBOL_TO_JSID; | |
use js::glue::int_to_jsid; | |
use js::jsapi::AutoIdVector; | |
use js::jsapi::Call; | |
use js::jsapi::CallArgs; | |
use js::jsapi::CurrentGlobalOrNull; | |
use js::jsapi::FreeOp; | |
use js::jsapi::GetPropertyKeys; | |
use js::jsapi::GetWellKnownSymbol; | |
use js::jsapi::Handle; | |
use js::jsapi::HandleId; | |
use js::jsapi::HandleObject; | |
use js::jsapi::HandleValue; | |
use js::jsapi::HandleValueArray; | |
use js::jsapi::INTERNED_STRING_TO_JSID; | |
use js::jsapi::IsCallable; | |
use js::jsapi::JSAutoCompartment; | |
use js::jsapi::JSCLASS_RESERVED_SLOTS_SHIFT; | |
use js::jsapi::JSClass; | |
use js::jsapi::JSContext; | |
use js::jsapi::JSFreeOp; | |
use js::jsapi::JSFunctionSpec; | |
use js::jsapi::JSITER_HIDDEN; | |
use js::jsapi::JSITER_OWNONLY; | |
use js::jsapi::JSITER_SYMBOLS; | |
use js::jsapi::JSJitGetterCallArgs; | |
use js::jsapi::JSJitInfo; | |
use js::jsapi::JSJitInfo_AliasSet; | |
use js::jsapi::JSJitInfo_ArgType; | |
use js::jsapi::JSJitInfo_OpType; | |
use js::jsapi::JSJitMethodCallArgs; | |
use js::jsapi::JSJitSetterCallArgs; | |
use js::jsapi::JSNative; | |
use js::jsapi::JSNativeWrapper; | |
use js::jsapi::JSObject; | |
use js::jsapi::JSPROP_ENUMERATE; | |
use js::jsapi::JSPROP_PERMANENT; | |
use js::jsapi::JSPROP_READONLY; | |
use js::jsapi::JSPROP_SHARED; | |
use js::jsapi::JSPropertySpec; | |
use js::jsapi::JSString; | |
use js::jsapi::JSTracer; | |
use js::jsapi::JSType; | |
use js::jsapi::JSTypedMethodJitInfo; | |
use js::jsapi::JSValueType; | |
use js::jsapi::JS_AtomizeAndPinString; | |
use js::jsapi::JS_CallFunctionValue; | |
use js::jsapi::JS_CopyPropertiesFrom; | |
use js::jsapi::JS_DefineProperty; | |
use js::jsapi::JS_DefinePropertyById2; | |
use js::jsapi::JS_ForwardGetPropertyTo; | |
use js::jsapi::JS_GetClass; | |
use js::jsapi::JS_GetErrorPrototype; | |
use js::jsapi::JS_GetFunctionPrototype; | |
use js::jsapi::JS_GetGlobalForObject; | |
use js::jsapi::JS_GetIteratorPrototype; | |
use js::jsapi::JS_GetObjectPrototype; | |
use js::jsapi::JS_GetProperty; | |
use js::jsapi::JS_GetPropertyById; | |
use js::jsapi::JS_GetPropertyDescriptorById; | |
use js::jsapi::JS_GetReservedSlot; | |
use js::jsapi::JS_HasProperty; | |
use js::jsapi::JS_HasPropertyById; | |
use js::jsapi::JS_InitializePropertiesFromCompatibleNativeObject; | |
use js::jsapi::JS_NewObject; | |
use js::jsapi::JS_NewObjectWithGivenProto; | |
use js::jsapi::JS_NewObjectWithoutMetadata; | |
use js::jsapi::JS_SetImmutablePrototype; | |
use js::jsapi::JS_SetProperty; | |
use js::jsapi::JS_SetReservedSlot; | |
use js::jsapi::JS_SplicePrototype; | |
use js::jsapi::JS_WrapValue; | |
use js::jsapi::MutableHandle; | |
use js::jsapi::MutableHandleObject; | |
use js::jsapi::MutableHandleValue; | |
use js::jsapi::ObjectOpResult; | |
use js::jsapi::PropertyDescriptor; | |
use js::jsapi::RootedId; | |
use js::jsapi::RootedObject; | |
use js::jsapi::RootedString; | |
use js::jsapi::SymbolCode; | |
use js::jsapi::jsid; | |
use js::jsval::JSVal; | |
use js::jsval::NullValue; | |
use js::jsval::ObjectOrNullValue; | |
use js::jsval::ObjectValue; | |
use js::jsval::PrivateValue; | |
use js::jsval::UndefinedValue; | |
use js::rust::GCMethods; | |
use js::rust::define_methods; | |
use js::rust::define_properties; | |
use libc; | |
use mem::heap_size_of_raw_self_and_children; | |
use script_runtime::maybe_take_panic_result; | |
use std::borrow::ToOwned; | |
use std::cmp; | |
use std::default::Default; | |
use std::ffi::CString; | |
use std::mem; | |
use std::num; | |
use std::os; | |
use std::panic; | |
use std::ptr; | |
use std::rc; | |
use std::rc::Rc; | |
use std::str; | |
use util::prefs::PREFS; | |
#[repr(usize)] | |
#[derive(JSTraceable, PartialEq, Copy, Clone, HeapSizeOf, Debug)] | |
pub enum DocumentReadyState { | |
Loading, | |
Interactive, | |
Complete | |
} | |
pub mod DocumentReadyStateValues { | |
use dom::bindings::conversions::ToJSValConvertible; | |
use js::jsapi::{JSContext, MutableHandleValue}; | |
use js::jsval::JSVal; | |
pub const strings: &'static [&'static str] = &[ | |
"loading", | |
"interactive", | |
"complete", | |
]; | |
impl ToJSValConvertible for super::DocumentReadyState { | |
unsafe fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandleValue) { | |
strings[*self as usize].to_jsval(cx, rval); | |
} | |
} | |
} // mod DocumentReadyStateValues | |
pub use self::DocumentBinding::{Wrap, DocumentMethods, GetProtoObject, GetConstructorObject, DefineDOMInterface}; | |
pub mod DocumentBinding { | |
#![allow(non_camel_case_types,non_upper_case_globals,unused_imports,unused_variables,unused_assignments)] | |
use core::nonzero::NonZero; | |
use dom; | |
use dom::bindings; | |
use dom::bindings::callback::CallSetup; | |
use dom::bindings::callback::CallbackContainer; | |
use dom::bindings::callback::CallbackFunction; | |
use dom::bindings::callback::CallbackInterface; | |
use dom::bindings::callback::ExceptionHandling; | |
use dom::bindings::callback::wrap_call_this_object; | |
use dom::bindings::codegen::Bindings::CharacterDataBinding::CharacterDataBinding; | |
use dom::bindings::codegen::Bindings::DocumentBinding::DocumentReadyState; | |
use dom::bindings::codegen::Bindings::DocumentBinding::DocumentReadyStateValues; | |
use dom::bindings::codegen::Bindings::ElementBinding::ElementBinding; | |
use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull; | |
use dom::bindings::codegen::Bindings::EventHandlerBinding::OnErrorEventHandlerNonNull; | |
use dom::bindings::codegen::Bindings::EventTargetBinding::EventTargetBinding; | |
use dom::bindings::codegen::Bindings::HTMLElementBinding::HTMLElementBinding; | |
use dom::bindings::codegen::Bindings::NodeBinding::NodeBinding; | |
use dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilter; | |
use dom::bindings::codegen::InterfaceObjectMap; | |
use dom::bindings::codegen::PrototypeList; | |
use dom::bindings::codegen::RegisterBindings; | |
use dom::bindings::codegen::UnionTypes; | |
use dom::bindings::constant::ConstantSpec; | |
use dom::bindings::constant::ConstantVal; | |
use dom::bindings::conversions::ConversionBehavior; | |
use dom::bindings::conversions::ConversionResult; | |
use dom::bindings::conversions::DOM_OBJECT_SLOT; | |
use dom::bindings::conversions::FromJSValConvertible; | |
use dom::bindings::conversions::IDLInterface; | |
use dom::bindings::conversions::StringificationBehavior; | |
use dom::bindings::conversions::ToJSValConvertible; | |
use dom::bindings::conversions::is_array_like; | |
use dom::bindings::conversions::native_from_handlevalue; | |
use dom::bindings::conversions::native_from_object; | |
use dom::bindings::conversions::private_from_object; | |
use dom::bindings::conversions::root_from_handleobject; | |
use dom::bindings::conversions::root_from_handlevalue; | |
use dom::bindings::conversions::root_from_object; | |
use dom::bindings::conversions::string_jsid_to_string; | |
use dom::bindings::error::Error; | |
use dom::bindings::error::Error::JSFailed; | |
use dom::bindings::error::ErrorResult; | |
use dom::bindings::error::Fallible; | |
use dom::bindings::error::throw_dom_exception; | |
use dom::bindings::guard::Condition; | |
use dom::bindings::guard::Guard; | |
use dom::bindings::interface::ConstructorClassHook; | |
use dom::bindings::interface::InterfaceConstructorBehavior; | |
use dom::bindings::interface::NonCallbackInterfaceObjectClass; | |
use dom::bindings::interface::create_callback_interface_object; | |
use dom::bindings::interface::create_global_object; | |
use dom::bindings::interface::create_interface_prototype_object; | |
use dom::bindings::interface::create_named_constructors; | |
use dom::bindings::interface::create_noncallback_interface_object; | |
use dom::bindings::interface::define_guarded_constants; | |
use dom::bindings::interface::define_guarded_methods; | |
use dom::bindings::interface::define_guarded_properties; | |
use dom::bindings::interface::is_exposed_in; | |
use dom::bindings::iterable::Iterable; | |
use dom::bindings::iterable::IteratorType; | |
use dom::bindings::js::JS; | |
use dom::bindings::js::Root; | |
use dom::bindings::js::RootedReference; | |
use dom::bindings::mozmap::MozMap; | |
use dom::bindings::namespace::NamespaceObjectClass; | |
use dom::bindings::namespace::create_namespace_object; | |
use dom::bindings::num::Finite; | |
use dom::bindings::proxyhandler; | |
use dom::bindings::proxyhandler::ensure_expando_object; | |
use dom::bindings::proxyhandler::fill_property_descriptor; | |
use dom::bindings::proxyhandler::get_expando_object; | |
use dom::bindings::proxyhandler::get_property_descriptor; | |
use dom::bindings::reflector::MutReflectable; | |
use dom::bindings::reflector::Reflectable; | |
use dom::bindings::str::ByteString; | |
use dom::bindings::str::DOMString; | |
use dom::bindings::str::USVString; | |
use dom::bindings::trace::JSTraceable; | |
use dom::bindings::trace::RootedTraceable; | |
use dom::bindings::utils::DOMClass; | |
use dom::bindings::utils::DOMJSClass; | |
use dom::bindings::utils::DOM_PROTO_UNFORGEABLE_HOLDER_SLOT; | |
use dom::bindings::utils::JSCLASS_DOM_GLOBAL; | |
use dom::bindings::utils::ProtoOrIfaceArray; | |
use dom::bindings::utils::enumerate_global; | |
use dom::bindings::utils::finalize_global; | |
use dom::bindings::utils::find_enum_string_index; | |
use dom::bindings::utils::generic_getter; | |
use dom::bindings::utils::generic_lenient_getter; | |
use dom::bindings::utils::generic_lenient_setter; | |
use dom::bindings::utils::generic_method; | |
use dom::bindings::utils::generic_setter; | |
use dom::bindings::utils::get_array_index_from_id; | |
use dom::bindings::utils::get_dictionary_property; | |
use dom::bindings::utils::get_property_on_prototype; | |
use dom::bindings::utils::get_proto_or_iface_array; | |
use dom::bindings::utils::has_property_on_prototype; | |
use dom::bindings::utils::is_platform_object; | |
use dom::bindings::utils::resolve_global; | |
use dom::bindings::utils::set_dictionary_property; | |
use dom::bindings::utils::trace_global; | |
use dom::bindings::utils::wrap_panic; | |
use dom::bindings::weakref::DOM_WEAK_SLOT; | |
use dom::bindings::weakref::WeakBox; | |
use dom::bindings::weakref::WeakReferenceable; | |
use dom::browsingcontext::BrowsingContext; | |
use dom::globalscope::GlobalScope; | |
use dom::types::Attr; | |
use dom::types::CharacterData; | |
use dom::types::Comment; | |
use dom::types::DOMImplementation; | |
use dom::types::Document; | |
use dom::types::DocumentFragment; | |
use dom::types::DocumentType; | |
use dom::types::Element; | |
use dom::types::Event; | |
use dom::types::EventTarget; | |
use dom::types::HTMLCollection; | |
use dom::types::HTMLElement; | |
use dom::types::HTMLHeadElement; | |
use dom::types::HTMLScriptElement; | |
use dom::types::Location; | |
use dom::types::Node; | |
use dom::types::NodeIterator; | |
use dom::types::NodeList; | |
use dom::types::ProcessingInstruction; | |
use dom::types::Range; | |
use dom::types::StyleSheetList; | |
use dom::types::Text; | |
use dom::types::Touch; | |
use dom::types::TouchList; | |
use dom::types::TreeWalker; | |
use dom::types::Window; | |
use js; | |
use js::JSCLASS_GLOBAL_SLOT_COUNT; | |
use js::JSCLASS_IS_DOMJSCLASS; | |
use js::JSCLASS_IS_GLOBAL; | |
use js::JSCLASS_RESERVED_SLOTS_MASK; | |
use js::JS_CALLEE; | |
use js::error::throw_type_error; | |
use js::glue::AppendToAutoIdVector; | |
use js::glue::CallJitGetterOp; | |
use js::glue::CallJitMethodOp; | |
use js::glue::CallJitSetterOp; | |
use js::glue::CreateProxyHandler; | |
use js::glue::GetProxyPrivate; | |
use js::glue::NewProxyObject; | |
use js::glue::ProxyTraps; | |
use js::glue::RUST_JSID_IS_STRING; | |
use js::glue::RUST_SYMBOL_TO_JSID; | |
use js::glue::int_to_jsid; | |
use js::jsapi::AutoIdVector; | |
use js::jsapi::Call; | |
use js::jsapi::CallArgs; | |
use js::jsapi::CurrentGlobalOrNull; | |
use js::jsapi::FreeOp; | |
use js::jsapi::GetPropertyKeys; | |
use js::jsapi::GetWellKnownSymbol; | |
use js::jsapi::Handle; | |
use js::jsapi::HandleId; | |
use js::jsapi::HandleObject; | |
use js::jsapi::HandleValue; | |
use js::jsapi::HandleValueArray; | |
use js::jsapi::INTERNED_STRING_TO_JSID; | |
use js::jsapi::IsCallable; | |
use js::jsapi::JSAutoCompartment; | |
use js::jsapi::JSCLASS_RESERVED_SLOTS_SHIFT; | |
use js::jsapi::JSClass; | |
use js::jsapi::JSContext; | |
use js::jsapi::JSFreeOp; | |
use js::jsapi::JSFunctionSpec; | |
use js::jsapi::JSITER_HIDDEN; | |
use js::jsapi::JSITER_OWNONLY; | |
use js::jsapi::JSITER_SYMBOLS; | |
use js::jsapi::JSJitGetterCallArgs; | |
use js::jsapi::JSJitInfo; | |
use js::jsapi::JSJitInfo_AliasSet; | |
use js::jsapi::JSJitInfo_ArgType; | |
use js::jsapi::JSJitInfo_OpType; | |
use js::jsapi::JSJitMethodCallArgs; | |
use js::jsapi::JSJitSetterCallArgs; | |
use js::jsapi::JSNative; | |
use js::jsapi::JSNativeWrapper; | |
use js::jsapi::JSObject; | |
use js::jsapi::JSPROP_ENUMERATE; | |
use js::jsapi::JSPROP_PERMANENT; | |
use js::jsapi::JSPROP_READONLY; | |
use js::jsapi::JSPROP_SHARED; | |
use js::jsapi::JSPropertySpec; | |
use js::jsapi::JSString; | |
use js::jsapi::JSTracer; | |
use js::jsapi::JSType; | |
use js::jsapi::JSTypedMethodJitInfo; | |
use js::jsapi::JSValueType; | |
use js::jsapi::JS_AtomizeAndPinString; | |
use js::jsapi::JS_CallFunctionValue; | |
use js::jsapi::JS_CopyPropertiesFrom; | |
use js::jsapi::JS_DefineProperty; | |
use js::jsapi::JS_DefinePropertyById2; | |
use js::jsapi::JS_ForwardGetPropertyTo; | |
use js::jsapi::JS_GetClass; | |
use js::jsapi::JS_GetErrorPrototype; | |
use js::jsapi::JS_GetFunctionPrototype; | |
use js::jsapi::JS_GetGlobalForObject; | |
use js::jsapi::JS_GetIteratorPrototype; | |
use js::jsapi::JS_GetObjectPrototype; | |
use js::jsapi::JS_GetProperty; | |
use js::jsapi::JS_GetPropertyById; | |
use js::jsapi::JS_GetPropertyDescriptorById; | |
use js::jsapi::JS_GetReservedSlot; | |
use js::jsapi::JS_HasProperty; | |
use js::jsapi::JS_HasPropertyById; | |
use js::jsapi::JS_InitializePropertiesFromCompatibleNativeObject; | |
use js::jsapi::JS_NewObject; | |
use js::jsapi::JS_NewObjectWithGivenProto; | |
use js::jsapi::JS_NewObjectWithoutMetadata; | |
use js::jsapi::JS_SetImmutablePrototype; | |
use js::jsapi::JS_SetProperty; | |
use js::jsapi::JS_SetReservedSlot; | |
use js::jsapi::JS_SplicePrototype; | |
use js::jsapi::JS_WrapValue; | |
use js::jsapi::MutableHandle; | |
use js::jsapi::MutableHandleObject; | |
use js::jsapi::MutableHandleValue; | |
use js::jsapi::ObjectOpResult; | |
use js::jsapi::PropertyDescriptor; | |
use js::jsapi::RootedId; | |
use js::jsapi::RootedObject; | |
use js::jsapi::RootedString; | |
use js::jsapi::SymbolCode; | |
use js::jsapi::jsid; | |
use js::jsval::JSVal; | |
use js::jsval::NullValue; | |
use js::jsval::ObjectOrNullValue; | |
use js::jsval::ObjectValue; | |
use js::jsval::PrivateValue; | |
use js::jsval::UndefinedValue; | |
use js::rust::GCMethods; | |
use js::rust::define_methods; | |
use js::rust::define_properties; | |
use libc; | |
use mem::heap_size_of_raw_self_and_children; | |
use script_runtime::maybe_take_panic_result; | |
use std::borrow::ToOwned; | |
use std::cmp; | |
use std::default::Default; | |
use std::ffi::CString; | |
use std::mem; | |
use std::num; | |
use std::os; | |
use std::panic; | |
use std::ptr; | |
use std::rc; | |
use std::rc::Rc; | |
use std::str; | |
use util::prefs::PREFS; | |
unsafe extern fn get_implementation(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Root<DOMImplementation> = this.Implementation(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const implementation_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_implementation as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasNone as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
true, | |
true, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_URL(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: USVString = this.URL(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const URL_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_URL as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasNone as u8, | |
JSValueType::JSVAL_TYPE_STRING as u8, | |
true, | |
true, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_documentURI(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: USVString = this.DocumentURI(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const documentURI_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_documentURI as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasNone as u8, | |
JSValueType::JSVAL_TYPE_STRING as u8, | |
true, | |
true, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_compatMode(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: DOMString = this.CompatMode(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const compatMode_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_compatMode as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_STRING as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_characterSet(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: DOMString = this.CharacterSet(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const characterSet_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_characterSet as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_STRING as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_charset(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: DOMString = this.Charset(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const charset_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_charset as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_STRING as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_inputEncoding(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: DOMString = this.InputEncoding(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const inputEncoding_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_inputEncoding as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_STRING as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_contentType(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: DOMString = this.ContentType(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const contentType_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_contentType as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasNone as u8, | |
JSValueType::JSVAL_TYPE_STRING as u8, | |
true, | |
true, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_doctype(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Root<DocumentType>> = this.GetDoctype(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const doctype_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_doctype as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasDOMSets as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
true, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_documentElement(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Root<Element>> = this.GetDocumentElement(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const documentElement_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_documentElement as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasDOMSets as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
true, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn getElementsByTagName(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
if argc < 1 { | |
throw_type_error(cx, "Not enough arguments to \"Document.getElementsByTagName\"."); | |
return false; | |
} | |
let arg0: DOMString = match FromJSValConvertible::from_jsval(cx, args.get(0), StringificationBehavior::Default) { | |
Ok(ConversionResult::Success(strval)) => strval, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
let result: Root<HTMLCollection> = this.GetElementsByTagName(arg0); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const getElementsByTagName_methodinfo: JSJitInfo = JSJitInfo { | |
call: getElementsByTagName as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn getElementsByTagNameNS(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
if argc < 2 { | |
throw_type_error(cx, "Not enough arguments to \"Document.getElementsByTagNameNS\"."); | |
return false; | |
} | |
let arg0: Option<DOMString> = match FromJSValConvertible::from_jsval(cx, args.get(0), StringificationBehavior::Default) { | |
Ok(ConversionResult::Success(strval)) => strval, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
let arg1: DOMString = match FromJSValConvertible::from_jsval(cx, args.get(1), StringificationBehavior::Default) { | |
Ok(ConversionResult::Success(strval)) => strval, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
let result: Root<HTMLCollection> = this.GetElementsByTagNameNS(arg0, arg1); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const getElementsByTagNameNS_methodinfo: JSJitInfo = JSJitInfo { | |
call: getElementsByTagNameNS as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn getElementsByClassName(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
if argc < 1 { | |
throw_type_error(cx, "Not enough arguments to \"Document.getElementsByClassName\"."); | |
return false; | |
} | |
let arg0: DOMString = match FromJSValConvertible::from_jsval(cx, args.get(0), StringificationBehavior::Default) { | |
Ok(ConversionResult::Success(strval)) => strval, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
let result: Root<HTMLCollection> = this.GetElementsByClassName(arg0); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const getElementsByClassName_methodinfo: JSJitInfo = JSJitInfo { | |
call: getElementsByClassName as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn createElement(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
if argc < 1 { | |
throw_type_error(cx, "Not enough arguments to \"Document.createElement\"."); | |
return false; | |
} | |
let arg0: DOMString = match FromJSValConvertible::from_jsval(cx, args.get(0), StringificationBehavior::Default) { | |
Ok(ConversionResult::Success(strval)) => strval, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
let result: Result<Root<Element>, Error> = this.CreateElement(arg0); | |
let result = match result { | |
Ok(result) => result, | |
Err(e) => { | |
throw_dom_exception(cx, &this.global(), e); | |
return false; | |
}, | |
}; | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const createElement_methodinfo: JSJitInfo = JSJitInfo { | |
call: createElement as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn createElementNS(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
if argc < 2 { | |
throw_type_error(cx, "Not enough arguments to \"Document.createElementNS\"."); | |
return false; | |
} | |
let arg0: Option<DOMString> = match FromJSValConvertible::from_jsval(cx, args.get(0), StringificationBehavior::Default) { | |
Ok(ConversionResult::Success(strval)) => strval, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
let arg1: DOMString = match FromJSValConvertible::from_jsval(cx, args.get(1), StringificationBehavior::Default) { | |
Ok(ConversionResult::Success(strval)) => strval, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
let result: Result<Root<Element>, Error> = this.CreateElementNS(arg0, arg1); | |
let result = match result { | |
Ok(result) => result, | |
Err(e) => { | |
throw_dom_exception(cx, &this.global(), e); | |
return false; | |
}, | |
}; | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const createElementNS_methodinfo: JSJitInfo = JSJitInfo { | |
call: createElementNS as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn createDocumentFragment(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
let result: Root<DocumentFragment> = this.CreateDocumentFragment(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const createDocumentFragment_methodinfo: JSJitInfo = JSJitInfo { | |
call: createDocumentFragment as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn createTextNode(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
if argc < 1 { | |
throw_type_error(cx, "Not enough arguments to \"Document.createTextNode\"."); | |
return false; | |
} | |
let arg0: DOMString = match FromJSValConvertible::from_jsval(cx, args.get(0), StringificationBehavior::Default) { | |
Ok(ConversionResult::Success(strval)) => strval, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
let result: Root<Text> = this.CreateTextNode(arg0); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const createTextNode_methodinfo: JSJitInfo = JSJitInfo { | |
call: createTextNode as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn createComment(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
if argc < 1 { | |
throw_type_error(cx, "Not enough arguments to \"Document.createComment\"."); | |
return false; | |
} | |
let arg0: DOMString = match FromJSValConvertible::from_jsval(cx, args.get(0), StringificationBehavior::Default) { | |
Ok(ConversionResult::Success(strval)) => strval, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
let result: Root<Comment> = this.CreateComment(arg0); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const createComment_methodinfo: JSJitInfo = JSJitInfo { | |
call: createComment as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn createProcessingInstruction(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
if argc < 2 { | |
throw_type_error(cx, "Not enough arguments to \"Document.createProcessingInstruction\"."); | |
return false; | |
} | |
let arg0: DOMString = match FromJSValConvertible::from_jsval(cx, args.get(0), StringificationBehavior::Default) { | |
Ok(ConversionResult::Success(strval)) => strval, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
let arg1: DOMString = match FromJSValConvertible::from_jsval(cx, args.get(1), StringificationBehavior::Default) { | |
Ok(ConversionResult::Success(strval)) => strval, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
let result: Result<Root<ProcessingInstruction>, Error> = this.CreateProcessingInstruction(arg0, arg1); | |
let result = match result { | |
Ok(result) => result, | |
Err(e) => { | |
throw_dom_exception(cx, &this.global(), e); | |
return false; | |
}, | |
}; | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const createProcessingInstruction_methodinfo: JSJitInfo = JSJitInfo { | |
call: createProcessingInstruction as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn importNode(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
if argc < 1 { | |
throw_type_error(cx, "Not enough arguments to \"Document.importNode\"."); | |
return false; | |
} | |
let arg0: Root<Node> = if args.get(0).get().is_object() { | |
match root_from_handlevalue(args.get(0)) { | |
Ok(val) => val, | |
Err(()) => { | |
throw_type_error(cx, "value does not implement interface Node."); | |
return false; | |
} | |
} | |
} else { | |
throw_type_error(cx, "Value is not an object."); | |
return false; | |
}; | |
let arg1: bool = if args.get(1).is_undefined() { | |
false | |
} else { | |
match FromJSValConvertible::from_jsval(cx, args.get(1), ()) { | |
Ok(ConversionResult::Success(v)) => v, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
} | |
} | |
}; | |
let result: Result<Root<Node>, Error> = this.ImportNode(&arg0, arg1); | |
let result = match result { | |
Ok(result) => result, | |
Err(e) => { | |
throw_dom_exception(cx, &this.global(), e); | |
return false; | |
}, | |
}; | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const importNode_methodinfo: JSJitInfo = JSJitInfo { | |
call: importNode as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn adoptNode(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
if argc < 1 { | |
throw_type_error(cx, "Not enough arguments to \"Document.adoptNode\"."); | |
return false; | |
} | |
let arg0: Root<Node> = if args.get(0).get().is_object() { | |
match root_from_handlevalue(args.get(0)) { | |
Ok(val) => val, | |
Err(()) => { | |
throw_type_error(cx, "value does not implement interface Node."); | |
return false; | |
} | |
} | |
} else { | |
throw_type_error(cx, "Value is not an object."); | |
return false; | |
}; | |
let result: Result<Root<Node>, Error> = this.AdoptNode(&arg0); | |
let result = match result { | |
Ok(result) => result, | |
Err(e) => { | |
throw_dom_exception(cx, &this.global(), e); | |
return false; | |
}, | |
}; | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const adoptNode_methodinfo: JSJitInfo = JSJitInfo { | |
call: adoptNode as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn createAttribute(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
if argc < 1 { | |
throw_type_error(cx, "Not enough arguments to \"Document.createAttribute\"."); | |
return false; | |
} | |
let arg0: DOMString = match FromJSValConvertible::from_jsval(cx, args.get(0), StringificationBehavior::Default) { | |
Ok(ConversionResult::Success(strval)) => strval, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
let result: Result<Root<Attr>, Error> = this.CreateAttribute(arg0); | |
let result = match result { | |
Ok(result) => result, | |
Err(e) => { | |
throw_dom_exception(cx, &this.global(), e); | |
return false; | |
}, | |
}; | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const createAttribute_methodinfo: JSJitInfo = JSJitInfo { | |
call: createAttribute as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn createAttributeNS(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
if argc < 2 { | |
throw_type_error(cx, "Not enough arguments to \"Document.createAttributeNS\"."); | |
return false; | |
} | |
let arg0: Option<DOMString> = match FromJSValConvertible::from_jsval(cx, args.get(0), StringificationBehavior::Default) { | |
Ok(ConversionResult::Success(strval)) => strval, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
let arg1: DOMString = match FromJSValConvertible::from_jsval(cx, args.get(1), StringificationBehavior::Default) { | |
Ok(ConversionResult::Success(strval)) => strval, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
let result: Result<Root<Attr>, Error> = this.CreateAttributeNS(arg0, arg1); | |
let result = match result { | |
Ok(result) => result, | |
Err(e) => { | |
throw_dom_exception(cx, &this.global(), e); | |
return false; | |
}, | |
}; | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const createAttributeNS_methodinfo: JSJitInfo = JSJitInfo { | |
call: createAttributeNS as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn createEvent(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
if argc < 1 { | |
throw_type_error(cx, "Not enough arguments to \"Document.createEvent\"."); | |
return false; | |
} | |
let arg0: DOMString = match FromJSValConvertible::from_jsval(cx, args.get(0), StringificationBehavior::Default) { | |
Ok(ConversionResult::Success(strval)) => strval, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
let result: Result<Root<Event>, Error> = this.CreateEvent(arg0); | |
let result = match result { | |
Ok(result) => result, | |
Err(e) => { | |
throw_dom_exception(cx, &this.global(), e); | |
return false; | |
}, | |
}; | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const createEvent_methodinfo: JSJitInfo = JSJitInfo { | |
call: createEvent as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn createRange(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
let result: Root<Range> = this.CreateRange(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const createRange_methodinfo: JSJitInfo = JSJitInfo { | |
call: createRange as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn createNodeIterator(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
if argc < 1 { | |
throw_type_error(cx, "Not enough arguments to \"Document.createNodeIterator\"."); | |
return false; | |
} | |
let arg0: Root<Node> = if args.get(0).get().is_object() { | |
match root_from_handlevalue(args.get(0)) { | |
Ok(val) => val, | |
Err(()) => { | |
throw_type_error(cx, "value does not implement interface Node."); | |
return false; | |
} | |
} | |
} else { | |
throw_type_error(cx, "Value is not an object."); | |
return false; | |
}; | |
let arg1: u32 = if args.get(1).is_undefined() { | |
4294967295 | |
} else { | |
match FromJSValConvertible::from_jsval(cx, args.get(1), ConversionBehavior::Default) { | |
Ok(ConversionResult::Success(v)) => v, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
} | |
} | |
}; | |
let arg2: Option<Rc<dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilter>> = if args.get(2).is_undefined() { | |
None | |
} else { | |
if args.get(2).get().is_object() { | |
Some(dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilter::new(args.get(2).get().to_object())) | |
} else if args.get(2).get().is_null_or_undefined() { | |
None | |
} else { | |
throw_type_error(cx, "Value is not an object."); | |
return false; | |
} | |
}; | |
let result: Root<NodeIterator> = this.CreateNodeIterator(&arg0, arg1, arg2); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const createNodeIterator_methodinfo: JSJitInfo = JSJitInfo { | |
call: createNodeIterator as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn createTreeWalker(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
if argc < 1 { | |
throw_type_error(cx, "Not enough arguments to \"Document.createTreeWalker\"."); | |
return false; | |
} | |
let arg0: Root<Node> = if args.get(0).get().is_object() { | |
match root_from_handlevalue(args.get(0)) { | |
Ok(val) => val, | |
Err(()) => { | |
throw_type_error(cx, "value does not implement interface Node."); | |
return false; | |
} | |
} | |
} else { | |
throw_type_error(cx, "Value is not an object."); | |
return false; | |
}; | |
let arg1: u32 = if args.get(1).is_undefined() { | |
4294967295 | |
} else { | |
match FromJSValConvertible::from_jsval(cx, args.get(1), ConversionBehavior::Default) { | |
Ok(ConversionResult::Success(v)) => v, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
} | |
} | |
}; | |
let arg2: Option<Rc<dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilter>> = if args.get(2).is_undefined() { | |
None | |
} else { | |
if args.get(2).get().is_object() { | |
Some(dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilter::new(args.get(2).get().to_object())) | |
} else if args.get(2).get().is_null_or_undefined() { | |
None | |
} else { | |
throw_type_error(cx, "Value is not an object."); | |
return false; | |
} | |
}; | |
let result: Root<TreeWalker> = this.CreateTreeWalker(&arg0, arg1, arg2); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const createTreeWalker_methodinfo: JSJitInfo = JSJitInfo { | |
call: createTreeWalker as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_location(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Root<Location>> = this.GetLocation(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const location_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_location as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_domain(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: DOMString = this.Domain(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const domain_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_domain as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_STRING as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_referrer(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: DOMString = this.Referrer(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const referrer_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_referrer as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_STRING as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_cookie(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Result<DOMString, Error> = this.GetCookie(); | |
let result = match result { | |
Ok(result) => result, | |
Err(e) => { | |
throw_dom_exception(cx, &this.global(), e); | |
return false; | |
}, | |
}; | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_cookie(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: DOMString = match FromJSValConvertible::from_jsval(cx, args.get(0), StringificationBehavior::Default) { | |
Ok(ConversionResult::Success(strval)) => strval, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
let result: Result<(), Error> = this.SetCookie(arg0); | |
let result = match result { | |
Ok(result) => result, | |
Err(e) => { | |
throw_dom_exception(cx, &this.global(), e); | |
return false; | |
}, | |
}; | |
return true;}, false); | |
} | |
const cookie_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_cookie as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_STRING as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const cookie_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_cookie as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_lastModified(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: DOMString = this.LastModified(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const lastModified_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_lastModified as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_STRING as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_readyState(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: DocumentReadyState = this.ReadyState(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const readyState_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_readyState as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_STRING as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_title(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: DOMString = this.Title(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_title(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: DOMString = match FromJSValConvertible::from_jsval(cx, args.get(0), StringificationBehavior::Default) { | |
Ok(ConversionResult::Success(strval)) => strval, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
let result: () = this.SetTitle(arg0); | |
return true;}, false); | |
} | |
const title_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_title as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_STRING as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const title_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_title as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_body(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Root<HTMLElement>> = this.GetBody(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_body(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Root<HTMLElement>> = if args.get(0).get().is_object() { | |
Some(match root_from_handlevalue(args.get(0)) { | |
Ok(val) => val, | |
Err(()) => { | |
throw_type_error(cx, "value does not implement interface HTMLElement."); | |
return false; | |
} | |
}) | |
} else if args.get(0).get().is_null_or_undefined() { | |
None | |
} else { | |
throw_type_error(cx, "Value is not an object."); | |
return false; | |
}; | |
let result: Result<(), Error> = this.SetBody(arg0.r()); | |
let result = match result { | |
Ok(result) => result, | |
Err(e) => { | |
throw_dom_exception(cx, &this.global(), e); | |
return false; | |
}, | |
}; | |
return true;}, false); | |
} | |
const body_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_body as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const body_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_body as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_head(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Root<HTMLHeadElement>> = this.GetHead(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const head_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_head as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_images(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Root<HTMLCollection> = this.Images(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const images_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_images as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasNone as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
true, | |
true, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_embeds(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Root<HTMLCollection> = this.Embeds(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const embeds_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_embeds as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasNone as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
true, | |
true, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_plugins(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Root<HTMLCollection> = this.Plugins(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const plugins_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_plugins as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasNone as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
true, | |
true, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_links(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Root<HTMLCollection> = this.Links(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const links_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_links as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasNone as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
true, | |
true, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_forms(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Root<HTMLCollection> = this.Forms(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const forms_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_forms as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasNone as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
true, | |
true, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_scripts(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Root<HTMLCollection> = this.Scripts(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const scripts_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_scripts as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasNone as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
true, | |
true, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn getElementsByName(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
if argc < 1 { | |
throw_type_error(cx, "Not enough arguments to \"Document.getElementsByName\"."); | |
return false; | |
} | |
let arg0: DOMString = match FromJSValConvertible::from_jsval(cx, args.get(0), StringificationBehavior::Default) { | |
Ok(ConversionResult::Success(strval)) => strval, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
let result: Root<NodeList> = this.GetElementsByName(arg0); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const getElementsByName_methodinfo: JSJitInfo = JSJitInfo { | |
call: getElementsByName as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_currentScript(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Root<HTMLScriptElement>> = this.GetCurrentScript(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const currentScript_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_currentScript as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_defaultView(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Root<Window>> = this.GetDefaultView(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const defaultView_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_defaultView as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_activeElement(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Root<Element>> = this.GetActiveElement(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const activeElement_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_activeElement as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn hasFocus(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
let result: bool = this.HasFocus(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const hasFocus_methodinfo: JSJitInfo = JSJitInfo { | |
call: hasFocus as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_BOOLEAN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onreadystatechange(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnreadystatechange(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onreadystatechange(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnreadystatechange(arg0); | |
return true;}, false); | |
} | |
const onreadystatechange_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onreadystatechange as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onreadystatechange_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onreadystatechange as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_fgColor(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: DOMString = this.FgColor(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_fgColor(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: DOMString = match FromJSValConvertible::from_jsval(cx, args.get(0), StringificationBehavior::Empty) { | |
Ok(ConversionResult::Success(strval)) => strval, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
let result: () = this.SetFgColor(arg0); | |
return true;}, false); | |
} | |
const fgColor_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_fgColor as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_STRING as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const fgColor_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_fgColor as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_bgColor(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: DOMString = this.BgColor(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_bgColor(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: DOMString = match FromJSValConvertible::from_jsval(cx, args.get(0), StringificationBehavior::Empty) { | |
Ok(ConversionResult::Success(strval)) => strval, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
let result: () = this.SetBgColor(arg0); | |
return true;}, false); | |
} | |
const bgColor_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_bgColor as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_STRING as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const bgColor_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_bgColor as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_anchors(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Root<HTMLCollection> = this.Anchors(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const anchors_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_anchors as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasNone as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
true, | |
true, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_applets(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Root<HTMLCollection> = this.Applets(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const applets_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_applets as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasNone as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
true, | |
true, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn clear(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
let result: () = this.Clear(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const clear_methodinfo: JSJitInfo = JSJitInfo { | |
call: clear as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn captureEvents(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
let result: () = this.CaptureEvents(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const captureEvents_methodinfo: JSJitInfo = JSJitInfo { | |
call: captureEvents as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn releaseEvents(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
let result: () = this.ReleaseEvents(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const releaseEvents_methodinfo: JSJitInfo = JSJitInfo { | |
call: releaseEvents as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn createTouch(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
if argc < 7 { | |
throw_type_error(cx, "Not enough arguments to \"Document.createTouch\"."); | |
return false; | |
} | |
let arg0: Root<Window> = if args.get(0).get().is_object() { | |
match root_from_handlevalue(args.get(0)) { | |
Ok(val) => val, | |
Err(()) => { | |
throw_type_error(cx, "value does not implement interface Window."); | |
return false; | |
} | |
} | |
} else { | |
throw_type_error(cx, "Value is not an object."); | |
return false; | |
}; | |
let arg1: Root<EventTarget> = if args.get(1).get().is_object() { | |
match root_from_handlevalue(args.get(1)) { | |
Ok(val) => val, | |
Err(()) => { | |
throw_type_error(cx, "value does not implement interface EventTarget."); | |
return false; | |
} | |
} | |
} else { | |
throw_type_error(cx, "Value is not an object."); | |
return false; | |
}; | |
let arg2: i32 = match FromJSValConvertible::from_jsval(cx, args.get(2), ConversionBehavior::Default) { | |
Ok(ConversionResult::Success(v)) => v, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
} | |
}; | |
let arg3: Finite<f64> = match FromJSValConvertible::from_jsval(cx, args.get(3), ()) { | |
Ok(ConversionResult::Success(v)) => v, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
} | |
}; | |
let arg4: Finite<f64> = match FromJSValConvertible::from_jsval(cx, args.get(4), ()) { | |
Ok(ConversionResult::Success(v)) => v, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
} | |
}; | |
let arg5: Finite<f64> = match FromJSValConvertible::from_jsval(cx, args.get(5), ()) { | |
Ok(ConversionResult::Success(v)) => v, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
} | |
}; | |
let arg6: Finite<f64> = match FromJSValConvertible::from_jsval(cx, args.get(6), ()) { | |
Ok(ConversionResult::Success(v)) => v, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
} | |
}; | |
let result: Root<Touch> = this.CreateTouch(&arg0, &arg1, arg2, arg3, arg4, arg5, arg6); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const createTouch_methodinfo: JSJitInfo = JSJitInfo { | |
call: createTouch as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn createTouchList(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
rooted_vec!(let mut arg0); | |
if argc > 0 { | |
arg0.reserve(argc as usize - 0); | |
for variadicArg in 0..argc { | |
let slot: *const Touch = if args.get(variadicArg).get().is_object() { | |
match native_from_handlevalue(args.get(variadicArg)) { | |
Ok(val) => val, | |
Err(()) => { | |
throw_type_error(cx, "value does not implement interface Touch."); | |
return false; | |
} | |
} | |
} else { | |
throw_type_error(cx, "Value is not an object."); | |
return false; | |
}; | |
arg0.push(JS::from_ref(&*slot)); | |
} | |
} | |
let result: Root<TouchList> = this.CreateTouchList(arg0.r()); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const createTouchList_methodinfo: JSJitInfo = JSJitInfo { | |
call: createTouchList as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn elementFromPoint(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
if argc < 2 { | |
throw_type_error(cx, "Not enough arguments to \"Document.elementFromPoint\"."); | |
return false; | |
} | |
let arg0: Finite<f64> = match FromJSValConvertible::from_jsval(cx, args.get(0), ()) { | |
Ok(ConversionResult::Success(v)) => v, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
} | |
}; | |
let arg1: Finite<f64> = match FromJSValConvertible::from_jsval(cx, args.get(1), ()) { | |
Ok(ConversionResult::Success(v)) => v, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
} | |
}; | |
let result: Option<Root<Element>> = this.ElementFromPoint(arg0, arg1); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const elementFromPoint_methodinfo: JSJitInfo = JSJitInfo { | |
call: elementFromPoint as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn elementsFromPoint(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
if argc < 2 { | |
throw_type_error(cx, "Not enough arguments to \"Document.elementsFromPoint\"."); | |
return false; | |
} | |
let arg0: Finite<f64> = match FromJSValConvertible::from_jsval(cx, args.get(0), ()) { | |
Ok(ConversionResult::Success(v)) => v, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
} | |
}; | |
let arg1: Finite<f64> = match FromJSValConvertible::from_jsval(cx, args.get(1), ()) { | |
Ok(ConversionResult::Success(v)) => v, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
} | |
}; | |
let result: Vec<Root<Element>> = this.ElementsFromPoint(arg0, arg1); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const elementsFromPoint_methodinfo: JSJitInfo = JSJitInfo { | |
call: elementsFromPoint as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_styleSheets(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Root<StyleSheetList> = this.StyleSheets(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const styleSheets_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_styleSheets as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasNone as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
true, | |
true, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_oncopy(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOncopy(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_oncopy(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOncopy(arg0); | |
return true;}, false); | |
} | |
const oncopy_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_oncopy as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const oncopy_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_oncopy as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_oncut(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOncut(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_oncut(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOncut(arg0); | |
return true;}, false); | |
} | |
const oncut_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_oncut as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const oncut_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_oncut as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onpaste(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnpaste(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onpaste(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnpaste(arg0); | |
return true;}, false); | |
} | |
const onpaste_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onpaste as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onpaste_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onpaste as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onabort(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnabort(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onabort(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnabort(arg0); | |
return true;}, false); | |
} | |
const onabort_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onabort as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onabort_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onabort as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onblur(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnblur(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onblur(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnblur(arg0); | |
return true;}, false); | |
} | |
const onblur_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onblur as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onblur_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onblur as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_oncancel(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOncancel(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_oncancel(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOncancel(arg0); | |
return true;}, false); | |
} | |
const oncancel_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_oncancel as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const oncancel_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_oncancel as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_oncanplay(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOncanplay(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_oncanplay(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOncanplay(arg0); | |
return true;}, false); | |
} | |
const oncanplay_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_oncanplay as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const oncanplay_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_oncanplay as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_oncanplaythrough(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOncanplaythrough(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_oncanplaythrough(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOncanplaythrough(arg0); | |
return true;}, false); | |
} | |
const oncanplaythrough_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_oncanplaythrough as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const oncanplaythrough_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_oncanplaythrough as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onchange(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnchange(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onchange(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnchange(arg0); | |
return true;}, false); | |
} | |
const onchange_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onchange as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onchange_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onchange as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onclick(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnclick(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onclick(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnclick(arg0); | |
return true;}, false); | |
} | |
const onclick_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onclick as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onclick_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onclick as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onclose(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnclose(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onclose(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnclose(arg0); | |
return true;}, false); | |
} | |
const onclose_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onclose as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onclose_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onclose as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_oncontextmenu(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOncontextmenu(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_oncontextmenu(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOncontextmenu(arg0); | |
return true;}, false); | |
} | |
const oncontextmenu_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_oncontextmenu as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const oncontextmenu_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_oncontextmenu as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_oncuechange(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOncuechange(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_oncuechange(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOncuechange(arg0); | |
return true;}, false); | |
} | |
const oncuechange_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_oncuechange as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const oncuechange_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_oncuechange as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_ondblclick(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOndblclick(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_ondblclick(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOndblclick(arg0); | |
return true;}, false); | |
} | |
const ondblclick_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_ondblclick as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const ondblclick_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_ondblclick as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_ondrag(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOndrag(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_ondrag(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOndrag(arg0); | |
return true;}, false); | |
} | |
const ondrag_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_ondrag as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const ondrag_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_ondrag as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_ondragend(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOndragend(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_ondragend(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOndragend(arg0); | |
return true;}, false); | |
} | |
const ondragend_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_ondragend as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const ondragend_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_ondragend as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_ondragenter(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOndragenter(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_ondragenter(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOndragenter(arg0); | |
return true;}, false); | |
} | |
const ondragenter_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_ondragenter as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const ondragenter_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_ondragenter as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_ondragexit(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOndragexit(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_ondragexit(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOndragexit(arg0); | |
return true;}, false); | |
} | |
const ondragexit_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_ondragexit as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const ondragexit_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_ondragexit as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_ondragleave(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOndragleave(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_ondragleave(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOndragleave(arg0); | |
return true;}, false); | |
} | |
const ondragleave_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_ondragleave as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const ondragleave_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_ondragleave as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_ondragover(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOndragover(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_ondragover(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOndragover(arg0); | |
return true;}, false); | |
} | |
const ondragover_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_ondragover as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const ondragover_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_ondragover as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_ondragstart(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOndragstart(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_ondragstart(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOndragstart(arg0); | |
return true;}, false); | |
} | |
const ondragstart_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_ondragstart as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const ondragstart_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_ondragstart as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_ondrop(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOndrop(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_ondrop(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOndrop(arg0); | |
return true;}, false); | |
} | |
const ondrop_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_ondrop as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const ondrop_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_ondrop as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_ondurationchange(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOndurationchange(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_ondurationchange(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOndurationchange(arg0); | |
return true;}, false); | |
} | |
const ondurationchange_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_ondurationchange as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const ondurationchange_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_ondurationchange as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onemptied(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnemptied(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onemptied(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnemptied(arg0); | |
return true;}, false); | |
} | |
const onemptied_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onemptied as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onemptied_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onemptied as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onended(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnended(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onended(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnended(arg0); | |
return true;}, false); | |
} | |
const onended_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onended as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onended_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onended as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onerror(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::OnErrorEventHandlerNonNull>> = this.GetOnerror(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onerror(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<OnErrorEventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(OnErrorEventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnerror(arg0); | |
return true;}, false); | |
} | |
const onerror_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onerror as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onerror_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onerror as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onfocus(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnfocus(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onfocus(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnfocus(arg0); | |
return true;}, false); | |
} | |
const onfocus_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onfocus as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onfocus_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onfocus as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_oninput(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOninput(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_oninput(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOninput(arg0); | |
return true;}, false); | |
} | |
const oninput_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_oninput as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const oninput_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_oninput as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_oninvalid(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOninvalid(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_oninvalid(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOninvalid(arg0); | |
return true;}, false); | |
} | |
const oninvalid_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_oninvalid as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const oninvalid_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_oninvalid as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onkeydown(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnkeydown(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onkeydown(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnkeydown(arg0); | |
return true;}, false); | |
} | |
const onkeydown_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onkeydown as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onkeydown_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onkeydown as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onkeypress(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnkeypress(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onkeypress(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnkeypress(arg0); | |
return true;}, false); | |
} | |
const onkeypress_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onkeypress as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onkeypress_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onkeypress as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onkeyup(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnkeyup(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onkeyup(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnkeyup(arg0); | |
return true;}, false); | |
} | |
const onkeyup_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onkeyup as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onkeyup_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onkeyup as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onload(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnload(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onload(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnload(arg0); | |
return true;}, false); | |
} | |
const onload_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onload as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onload_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onload as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onloadeddata(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnloadeddata(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onloadeddata(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnloadeddata(arg0); | |
return true;}, false); | |
} | |
const onloadeddata_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onloadeddata as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onloadeddata_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onloadeddata as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onloadedmetadata(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnloadedmetadata(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onloadedmetadata(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnloadedmetadata(arg0); | |
return true;}, false); | |
} | |
const onloadedmetadata_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onloadedmetadata as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onloadedmetadata_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onloadedmetadata as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onloadstart(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnloadstart(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onloadstart(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnloadstart(arg0); | |
return true;}, false); | |
} | |
const onloadstart_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onloadstart as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onloadstart_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onloadstart as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onmousedown(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnmousedown(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onmousedown(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnmousedown(arg0); | |
return true;}, false); | |
} | |
const onmousedown_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onmousedown as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onmousedown_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onmousedown as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onmouseenter(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnmouseenter(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onmouseenter(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnmouseenter(arg0); | |
return true;}, false); | |
} | |
const onmouseenter_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onmouseenter as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onmouseenter_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onmouseenter as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onmouseleave(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnmouseleave(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onmouseleave(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnmouseleave(arg0); | |
return true;}, false); | |
} | |
const onmouseleave_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onmouseleave as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onmouseleave_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onmouseleave as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onmousemove(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnmousemove(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onmousemove(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnmousemove(arg0); | |
return true;}, false); | |
} | |
const onmousemove_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onmousemove as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onmousemove_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onmousemove as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onmouseout(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnmouseout(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onmouseout(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnmouseout(arg0); | |
return true;}, false); | |
} | |
const onmouseout_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onmouseout as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onmouseout_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onmouseout as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onmouseover(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnmouseover(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onmouseover(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnmouseover(arg0); | |
return true;}, false); | |
} | |
const onmouseover_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onmouseover as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onmouseover_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onmouseover as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onmouseup(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnmouseup(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onmouseup(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnmouseup(arg0); | |
return true;}, false); | |
} | |
const onmouseup_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onmouseup as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onmouseup_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onmouseup as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onwheel(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnwheel(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onwheel(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnwheel(arg0); | |
return true;}, false); | |
} | |
const onwheel_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onwheel as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onwheel_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onwheel as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onpause(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnpause(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onpause(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnpause(arg0); | |
return true;}, false); | |
} | |
const onpause_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onpause as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onpause_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onpause as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onplay(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnplay(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onplay(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnplay(arg0); | |
return true;}, false); | |
} | |
const onplay_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onplay as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onplay_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onplay as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onplaying(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnplaying(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onplaying(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnplaying(arg0); | |
return true;}, false); | |
} | |
const onplaying_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onplaying as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onplaying_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onplaying as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onprogress(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnprogress(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onprogress(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnprogress(arg0); | |
return true;}, false); | |
} | |
const onprogress_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onprogress as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onprogress_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onprogress as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onratechange(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnratechange(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onratechange(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnratechange(arg0); | |
return true;}, false); | |
} | |
const onratechange_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onratechange as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onratechange_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onratechange as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onreset(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnreset(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onreset(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnreset(arg0); | |
return true;}, false); | |
} | |
const onreset_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onreset as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onreset_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onreset as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onresize(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnresize(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onresize(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnresize(arg0); | |
return true;}, false); | |
} | |
const onresize_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onresize as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onresize_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onresize as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onscroll(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnscroll(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onscroll(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnscroll(arg0); | |
return true;}, false); | |
} | |
const onscroll_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onscroll as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onscroll_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onscroll as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onseeked(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnseeked(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onseeked(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnseeked(arg0); | |
return true;}, false); | |
} | |
const onseeked_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onseeked as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onseeked_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onseeked as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onseeking(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnseeking(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onseeking(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnseeking(arg0); | |
return true;}, false); | |
} | |
const onseeking_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onseeking as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onseeking_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onseeking as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onselect(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnselect(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onselect(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnselect(arg0); | |
return true;}, false); | |
} | |
const onselect_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onselect as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onselect_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onselect as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onshow(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnshow(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onshow(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnshow(arg0); | |
return true;}, false); | |
} | |
const onshow_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onshow as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onshow_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onshow as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onstalled(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnstalled(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onstalled(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnstalled(arg0); | |
return true;}, false); | |
} | |
const onstalled_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onstalled as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onstalled_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onstalled as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onsubmit(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnsubmit(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onsubmit(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnsubmit(arg0); | |
return true;}, false); | |
} | |
const onsubmit_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onsubmit as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onsubmit_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onsubmit as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onsuspend(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnsuspend(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onsuspend(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnsuspend(arg0); | |
return true;}, false); | |
} | |
const onsuspend_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onsuspend as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onsuspend_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onsuspend as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_ontimeupdate(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOntimeupdate(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_ontimeupdate(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOntimeupdate(arg0); | |
return true;}, false); | |
} | |
const ontimeupdate_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_ontimeupdate as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const ontimeupdate_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_ontimeupdate as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_ontoggle(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOntoggle(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_ontoggle(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOntoggle(arg0); | |
return true;}, false); | |
} | |
const ontoggle_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_ontoggle as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const ontoggle_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_ontoggle as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onvolumechange(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnvolumechange(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onvolumechange(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnvolumechange(arg0); | |
return true;}, false); | |
} | |
const onvolumechange_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onvolumechange as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onvolumechange_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onvolumechange as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_onwaiting(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOnwaiting(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_onwaiting(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOnwaiting(arg0); | |
return true;}, false); | |
} | |
const onwaiting_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_onwaiting as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const onwaiting_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_onwaiting as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_ontransitionend(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>> = this.GetOntransitionend(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
unsafe extern fn set_ontransitionend(cx: *mut JSContext, obj: HandleObject, this: *const Document, args: JSJitSetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let arg0: Option<Rc<EventHandlerNonNull>> = if args.get(0).get().is_object() { | |
Some(EventHandlerNonNull::new(args.get(0).get().to_object())) | |
} else { | |
None | |
}; | |
let result: () = this.SetOntransitionend(arg0); | |
return true;}, false); | |
} | |
const ontransitionend_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_ontransitionend as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
const ontransitionend_setterinfo: JSJitInfo = JSJitInfo { | |
call: set_ontransitionend as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Setter as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn getElementById(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
if argc < 1 { | |
throw_type_error(cx, "Not enough arguments to \"Document.getElementById\"."); | |
return false; | |
} | |
let arg0: DOMString = match FromJSValConvertible::from_jsval(cx, args.get(0), StringificationBehavior::Default) { | |
Ok(ConversionResult::Success(strval)) => strval, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
let result: Option<Root<Element>> = this.GetElementById(arg0); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const getElementById_methodinfo_argTypes: [i32; 2] = [ JSJitInfo_ArgType::String as i32, JSJitInfo_ArgType::ArgTypeListEnd as i32 ]; | |
const getElementById_methodinfo: JSTypedMethodJitInfo = JSTypedMethodJitInfo { | |
base: JSJitInfo { | |
call: getElementById as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasDOMSets as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
false, | |
true, | |
false, | |
false, | |
false, | |
true, | |
0 as u16, | |
) | |
}, | |
argTypes: &getElementById_methodinfo_argTypes as *const _ as *const JSJitInfo_ArgType, | |
}; | |
unsafe extern fn get_children(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Root<HTMLCollection> = this.Children(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const children_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_children as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasNone as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
true, | |
true, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_firstElementChild(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Root<Element>> = this.GetFirstElementChild(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const firstElementChild_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_firstElementChild as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasDOMSets as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
true, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_lastElementChild(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: Option<Root<Element>> = this.GetLastElementChild(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const lastElementChild_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_lastElementChild as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasDOMSets as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
true, | |
true, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn get_childElementCount(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: JSJitGetterCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let result: u32 = this.ChildElementCount(); | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const childElementCount_getterinfo: JSJitInfo = JSJitInfo { | |
call: get_childElementCount as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Getter as u8, | |
JSJitInfo_AliasSet::AliasDOMSets as u8, | |
JSValueType::JSVAL_TYPE_DOUBLE as u8, | |
true, | |
true, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn prepend(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
let mut arg0 = vec![]; | |
if argc > 0 { | |
arg0.reserve(argc as usize - 0); | |
for variadicArg in 0..argc { | |
let slot: UnionTypes::NodeOrString = match FromJSValConvertible::from_jsval(cx, args.get(variadicArg), ()) { | |
Ok(ConversionResult::Success(value)) => value, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
arg0.push(slot); | |
} | |
} | |
let result: Result<(), Error> = this.Prepend(arg0); | |
let result = match result { | |
Ok(result) => result, | |
Err(e) => { | |
throw_dom_exception(cx, &this.global(), e); | |
return false; | |
}, | |
}; | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const prepend_methodinfo: JSJitInfo = JSJitInfo { | |
call: prepend as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn append(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
let mut arg0 = vec![]; | |
if argc > 0 { | |
arg0.reserve(argc as usize - 0); | |
for variadicArg in 0..argc { | |
let slot: UnionTypes::NodeOrString = match FromJSValConvertible::from_jsval(cx, args.get(variadicArg), ()) { | |
Ok(ConversionResult::Success(value)) => value, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
arg0.push(slot); | |
} | |
} | |
let result: Result<(), Error> = this.Append(arg0); | |
let result = match result { | |
Ok(result) => result, | |
Err(e) => { | |
throw_dom_exception(cx, &this.global(), e); | |
return false; | |
}, | |
}; | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const append_methodinfo: JSJitInfo = JSJitInfo { | |
call: append as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_UNDEFINED as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn querySelector(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
if argc < 1 { | |
throw_type_error(cx, "Not enough arguments to \"Document.querySelector\"."); | |
return false; | |
} | |
let arg0: DOMString = match FromJSValConvertible::from_jsval(cx, args.get(0), StringificationBehavior::Default) { | |
Ok(ConversionResult::Success(strval)) => strval, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
let result: Result<Option<Root<Element>>, Error> = this.QuerySelector(arg0); | |
let result = match result { | |
Ok(result) => result, | |
Err(e) => { | |
throw_dom_exception(cx, &this.global(), e); | |
return false; | |
}, | |
}; | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const querySelector_methodinfo_argTypes: [i32; 2] = [ JSJitInfo_ArgType::String as i32, JSJitInfo_ArgType::ArgTypeListEnd as i32 ]; | |
const querySelector_methodinfo: JSTypedMethodJitInfo = JSTypedMethodJitInfo { | |
base: JSJitInfo { | |
call: querySelector as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasDOMSets as u8, | |
JSValueType::JSVAL_TYPE_UNKNOWN as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
true, | |
0 as u16, | |
) | |
}, | |
argTypes: &querySelector_methodinfo_argTypes as *const _ as *const JSJitInfo_ArgType, | |
}; | |
unsafe extern fn querySelectorAll(cx: *mut JSContext, _obj: HandleObject, this: *const Document, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
if argc < 1 { | |
throw_type_error(cx, "Not enough arguments to \"Document.querySelectorAll\"."); | |
return false; | |
} | |
let arg0: DOMString = match FromJSValConvertible::from_jsval(cx, args.get(0), StringificationBehavior::Default) { | |
Ok(ConversionResult::Success(strval)) => strval, | |
Ok(ConversionResult::Failure(error)) => { | |
throw_type_error(cx, &error); | |
return false; | |
} | |
_ => { return false; | |
}, | |
}; | |
let result: Result<Root<NodeList>, Error> = this.QuerySelectorAll(arg0); | |
let result = match result { | |
Ok(result) => result, | |
Err(e) => { | |
throw_dom_exception(cx, &this.global(), e); | |
return false; | |
}, | |
}; | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
const querySelectorAll_methodinfo: JSJitInfo = JSJitInfo { | |
call: querySelectorAll as *const os::raw::c_void, | |
protoID: PrototypeList::ID::Document as u16, | |
depth: 2, | |
_bitfield_1: | |
JSJitInfo::new_bitfield_1( | |
JSJitInfo_OpType::Method as u8, | |
JSJitInfo_AliasSet::AliasEverything as u8, | |
JSValueType::JSVAL_TYPE_OBJECT as u8, | |
false, | |
false, | |
false, | |
false, | |
false, | |
false, | |
0 as u16, | |
) | |
}; | |
unsafe extern fn _finalize(_fop: *mut JSFreeOp, obj: *mut JSObject) { | |
return wrap_panic(|| { | |
let this = native_from_object::<Document>(obj).unwrap(); | |
let weak_box_ptr = JS_GetReservedSlot(obj, DOM_WEAK_SLOT).to_private() as *mut WeakBox<Document>; | |
if !weak_box_ptr.is_null() { | |
let count = { | |
let weak_box = &*weak_box_ptr; | |
assert!(weak_box.value.get().is_some()); | |
assert!(weak_box.count.get() > 0); | |
weak_box.value.set(None); | |
let count = weak_box.count.get() - 1; | |
weak_box.count.set(count); | |
count | |
}; | |
if count == 0 { | |
mem::drop(Box::from_raw(weak_box_ptr)); | |
} | |
} | |
if !this.is_null() { | |
// The pointer can be null if the object is the unforgeable holder of that interface. | |
let _ = Box::from_raw(this as *mut Document); | |
} | |
debug!("Document finalize: {:p}", this);}, ()); | |
} | |
unsafe extern fn _trace(trc: *mut JSTracer, obj: *mut JSObject) { | |
return wrap_panic(|| { | |
let this = native_from_object::<Document>(obj).unwrap(); | |
if this.is_null() { return; } // GC during obj creation | |
(*this).trace(trc);}, ()); | |
} | |
pub unsafe fn DefineProxyHandler() -> *const libc::c_void { | |
let traps = ProxyTraps { | |
enter: None, | |
getOwnPropertyDescriptor: Some(getOwnPropertyDescriptor), | |
defineProperty: Some(proxyhandler::define_property), | |
ownPropertyKeys: Some(own_property_keys), | |
delete_: Some(proxyhandler::delete), | |
enumerate: None, | |
getPrototypeIfOrdinary: Some(proxyhandler::get_prototype_if_ordinary), | |
preventExtensions: Some(proxyhandler::prevent_extensions), | |
isExtensible: Some(proxyhandler::is_extensible), | |
has: None, | |
get: Some(get), | |
set: None, | |
call: None, | |
construct: None, | |
getPropertyDescriptor: Some(get_property_descriptor), | |
hasOwn: Some(hasOwn), | |
getOwnEnumerablePropertyKeys: Some(own_property_keys), | |
nativeCall: None, | |
hasInstance: None, | |
objectClassIs: None, | |
className: Some(className), | |
fun_toString: None, | |
boxedValue_unbox: None, | |
defaultValue: None, | |
trace: Some(_trace), | |
finalize: Some(_finalize), | |
objectMoved: None, | |
isCallable: None, | |
isConstructor: None, | |
}; | |
CreateProxyHandler(&traps, &Class as *const _ as *const _) | |
} | |
#[inline] unsafe fn UnwrapProxy(obj: HandleObject) -> *const Document { | |
/*if (xpc::WrapperFactory::IsXrayWrapper(obj)) { | |
obj = js::UnwrapObject(obj); | |
}*/ | |
//MOZ_ASSERT(IsProxy(obj)); | |
let box_ = GetProxyPrivate(obj.get()).to_private() as *const Document; | |
return box_; | |
} | |
static Class: DOMClass = DOMClass { | |
interface_chain: [ PrototypeList::ID::EventTarget, PrototypeList::ID::Node, PrototypeList::ID::Document, PrototypeList::ID::Last, PrototypeList::ID::Last, PrototypeList::ID::Last ], | |
type_id: ::dom::bindings::codegen::InheritTypes::TopTypeId { eventtarget: (::dom::bindings::codegen::InheritTypes::EventTargetTypeId::Node(::dom::bindings::codegen::InheritTypes::NodeTypeId::Document(::dom::bindings::codegen::InheritTypes::DocumentTypeId::Document))) }, | |
heap_size_of: heap_size_of_raw_self_and_children::<Document> as unsafe fn(_) -> _, | |
global: InterfaceObjectMap::EMPTY, | |
}; | |
unsafe extern fn own_property_keys(cx: *mut JSContext, proxy: HandleObject, props: *mut AutoIdVector) -> bool { | |
return wrap_panic(|| { | |
let unwrapped_proxy = UnwrapProxy(proxy); | |
for name in (*unwrapped_proxy).SupportedPropertyNames() { | |
let cstring = CString::new(name).unwrap(); | |
let jsstring = JS_AtomizeAndPinString(cx, cstring.as_ptr()); | |
rooted!(in(cx) let rooted = jsstring); | |
let jsid = INTERNED_STRING_TO_JSID(cx, rooted.handle().get()); | |
rooted!(in(cx) let rooted_jsid = jsid); | |
AppendToAutoIdVector(props, rooted_jsid.handle().get()); | |
} | |
let expando = get_expando_object(proxy); | |
if !expando.is_null() { | |
rooted!(in(cx) let rooted_expando = expando); | |
GetPropertyKeys(cx, rooted_expando.handle(), JSITER_OWNONLY | JSITER_HIDDEN | JSITER_SYMBOLS, props); | |
} | |
return true; | |
}, false); | |
} | |
unsafe extern fn getOwnPropertyDescriptor(cx: *mut JSContext, proxy: HandleObject, id: HandleId, desc: MutableHandle<PropertyDescriptor>) -> bool { | |
return wrap_panic(|| { | |
rooted!(in(cx) let expando = get_expando_object(proxy)); | |
//if (!xpc::WrapperFactory::IsXrayWrapper(proxy) && (expando = GetExpandoObject(proxy))) { | |
if !expando.is_null() { | |
if !JS_GetPropertyDescriptorById(cx, expando.handle(), id, desc) { | |
return false; | |
} | |
if !desc.obj.is_null() { | |
// Pretend the property lives on the wrapper. | |
desc.get().obj = proxy.get(); | |
return true; | |
} | |
} | |
if RUST_JSID_IS_STRING(id) { | |
let mut has_on_proto = false; | |
if !has_property_on_prototype(cx, proxy, id, &mut has_on_proto) { | |
return false; | |
} | |
if !has_on_proto { | |
let name = string_jsid_to_string(cx, id); | |
let this = UnwrapProxy(proxy); | |
let this = &*this; | |
let result: Option<NonZero<*mut JSObject>> = this.NamedGetter(cx, name); | |
if let Some(result) = result { | |
rooted!(in(cx) let mut result_root = UndefinedValue()); | |
(result).to_jsval(cx, result_root.handle_mut()); | |
desc.get().value = result_root.get(); | |
fill_property_descriptor(desc, proxy.get(), JSPROP_ENUMERATE | JSPROP_READONLY); | |
return true; | |
} | |
} | |
} | |
desc.get().obj = ptr::null_mut(); | |
return true;}, false); | |
} | |
unsafe extern fn className(cx: *mut JSContext, _proxy: HandleObject) -> *const i8 { | |
b"Document\0" as *const u8 as *const i8 | |
} | |
unsafe extern fn get(cx: *mut JSContext, proxy: HandleObject, receiver: HandleValue, id: HandleId, vp: MutableHandleValue) -> bool { | |
return wrap_panic(|| { | |
//MOZ_ASSERT(!xpc::WrapperFactory::IsXrayWrapper(proxy), | |
//"Should not have a XrayWrapper here"); | |
rooted!(in(cx) let expando = get_expando_object(proxy)); | |
if !expando.is_null() { | |
let mut hasProp = false; | |
if !JS_HasPropertyById(cx, expando.handle(), id, &mut hasProp) { | |
return false; | |
} | |
if hasProp { | |
return JS_ForwardGetPropertyTo(cx, expando.handle(), id, receiver, vp); | |
} | |
} | |
let mut found = false; | |
if !get_property_on_prototype(cx, proxy, receiver, id, &mut found, vp) { | |
return false; | |
} | |
if found { | |
return true; | |
} | |
if RUST_JSID_IS_STRING(id) { | |
let name = string_jsid_to_string(cx, id); | |
let this = UnwrapProxy(proxy); | |
let this = &*this; | |
let result: Option<NonZero<*mut JSObject>> = this.NamedGetter(cx, name); | |
if let Some(result) = result { | |
(result).to_jsval(cx, vp); | |
return true; | |
}} | |
vp.set(UndefinedValue()); | |
return true;}, false); | |
} | |
unsafe extern fn hasOwn(cx: *mut JSContext, proxy: HandleObject, id: HandleId, bp: *mut bool) -> bool { | |
return wrap_panic(|| { | |
rooted!(in(cx) let expando = get_expando_object(proxy)); | |
if !expando.is_null() { | |
let ok = JS_HasPropertyById(cx, expando.handle(), id, bp); | |
if !ok || *bp { | |
return ok; | |
} | |
} | |
if RUST_JSID_IS_STRING(id) { | |
let mut has_on_proto = false; | |
if !has_property_on_prototype(cx, proxy, id, &mut has_on_proto) { | |
return false; | |
} | |
if !has_on_proto { | |
let name = string_jsid_to_string(cx, id); | |
let this = UnwrapProxy(proxy); | |
let this = &*this; | |
let result: Option<NonZero<*mut JSObject>> = this.NamedGetter(cx, name); | |
*bp = result.is_some(); | |
return true; | |
} | |
} | |
*bp = false; | |
return true;}, false); | |
} | |
pub unsafe fn Wrap(cx: *mut JSContext, scope: &GlobalScope, object: Box<Document>) -> Root<Document> { | |
let scope = scope.reflector().get_jsobject(); | |
assert!(!scope.get().is_null()); | |
assert!(((*JS_GetClass(scope.get())).flags & JSCLASS_IS_GLOBAL) != 0); | |
rooted!(in(cx) let mut proto = ptr::null_mut()); | |
let _ac = JSAutoCompartment::new(cx, scope.get()); | |
GetProtoObject(cx, scope, proto.handle_mut()); | |
assert!(!proto.is_null()); | |
let raw = Box::into_raw(object); | |
let _rt = RootedTraceable::new(&*raw); | |
let handler = RegisterBindings::PROXY_HANDLERS[PrototypeList::Proxies::Document as usize]; | |
rooted!(in(cx) let private = PrivateValue(raw as *const libc::c_void)); | |
let obj = NewProxyObject(cx, handler, | |
private.handle(), | |
proto.get(), scope.get(), | |
ptr::null_mut(), ptr::null_mut()); | |
assert!(!obj.is_null()); | |
rooted!(in(cx) let obj = obj); | |
JS_SetReservedSlot(obj.get(), DOM_WEAK_SLOT, PrivateValue(ptr::null())); | |
rooted!(in(cx) let expando = ensure_expando_object(cx, obj.handle())); | |
rooted!(in(cx) let mut unforgeable_holder = ptr::null_mut()); | |
unforgeable_holder.handle_mut().set( | |
JS_GetReservedSlot(proto.get(), DOM_PROTO_UNFORGEABLE_HOLDER_SLOT).to_object()); | |
assert!(JS_InitializePropertiesFromCompatibleNativeObject(cx, expando.handle(), unforgeable_holder.handle())); | |
(*raw).init_reflector(obj.get()); | |
Root::from_ref(&*raw) | |
} | |
const unscopable_names: &'static [&'static [u8]] = &[ | |
b"prepend\0", | |
b"append\0" | |
]; | |
impl IDLInterface for Document { | |
#[inline] | |
fn derives(class: &'static DOMClass) -> bool { | |
class.interface_chain[2] == PrototypeList::ID::Document | |
} | |
} | |
impl PartialEq for Document { | |
fn eq(&self, other: &Document) -> bool { | |
self as *const Document == &*other | |
} | |
} | |
pub trait DocumentMethods { | |
fn Implementation(&self) -> Root<DOMImplementation>; | |
fn URL(&self) -> USVString; | |
fn DocumentURI(&self) -> USVString; | |
fn CompatMode(&self) -> DOMString; | |
fn CharacterSet(&self) -> DOMString; | |
fn Charset(&self) -> DOMString; | |
fn InputEncoding(&self) -> DOMString; | |
fn ContentType(&self) -> DOMString; | |
fn GetDoctype(&self) -> Option<Root<DocumentType>>; | |
fn GetDocumentElement(&self) -> Option<Root<Element>>; | |
fn GetElementsByTagName(&self, qualifiedName: DOMString) -> Root<HTMLCollection>; | |
fn GetElementsByTagNameNS(&self, namespace: Option<DOMString>, qualifiedName: DOMString) -> Root<HTMLCollection>; | |
fn GetElementsByClassName(&self, classNames: DOMString) -> Root<HTMLCollection>; | |
fn CreateElement(&self, localName: DOMString) -> Fallible<Root<Element>>; | |
fn CreateElementNS(&self, namespace: Option<DOMString>, qualifiedName: DOMString) -> Fallible<Root<Element>>; | |
fn CreateDocumentFragment(&self) -> Root<DocumentFragment>; | |
fn CreateTextNode(&self, data: DOMString) -> Root<Text>; | |
fn CreateComment(&self, data: DOMString) -> Root<Comment>; | |
fn CreateProcessingInstruction(&self, target: DOMString, data: DOMString) -> Fallible<Root<ProcessingInstruction>>; | |
fn ImportNode(&self, node: &Node, deep: bool) -> Fallible<Root<Node>>; | |
fn AdoptNode(&self, node: &Node) -> Fallible<Root<Node>>; | |
fn CreateAttribute(&self, localName: DOMString) -> Fallible<Root<Attr>>; | |
fn CreateAttributeNS(&self, namespace: Option<DOMString>, qualifiedName: DOMString) -> Fallible<Root<Attr>>; | |
fn CreateEvent(&self, interface_: DOMString) -> Fallible<Root<Event>>; | |
fn CreateRange(&self) -> Root<Range>; | |
fn CreateNodeIterator(&self, root: &Node, whatToShow: u32, filter: Option<Rc<dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilter>>) -> Root<NodeIterator>; | |
fn CreateTreeWalker(&self, root: &Node, whatToShow: u32, filter: Option<Rc<dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilter>>) -> Root<TreeWalker>; | |
fn GetLocation(&self) -> Option<Root<Location>>; | |
fn Domain(&self) -> DOMString; | |
fn Referrer(&self) -> DOMString; | |
fn GetCookie(&self) -> Fallible<DOMString>; | |
fn SetCookie(&self, value: DOMString) -> ErrorResult; | |
fn LastModified(&self) -> DOMString; | |
fn ReadyState(&self) -> DocumentReadyState; | |
fn Title(&self) -> DOMString; | |
fn SetTitle(&self, value: DOMString) -> (); | |
fn GetBody(&self) -> Option<Root<HTMLElement>>; | |
fn SetBody(&self, value: Option<&HTMLElement>) -> ErrorResult; | |
fn GetHead(&self) -> Option<Root<HTMLHeadElement>>; | |
fn Images(&self) -> Root<HTMLCollection>; | |
fn Embeds(&self) -> Root<HTMLCollection>; | |
fn Plugins(&self) -> Root<HTMLCollection>; | |
fn Links(&self) -> Root<HTMLCollection>; | |
fn Forms(&self) -> Root<HTMLCollection>; | |
fn Scripts(&self) -> Root<HTMLCollection>; | |
fn GetElementsByName(&self, elementName: DOMString) -> Root<NodeList>; | |
fn GetCurrentScript(&self) -> Option<Root<HTMLScriptElement>>; | |
fn GetDefaultView(&self) -> Option<Root<Window>>; | |
fn GetActiveElement(&self) -> Option<Root<Element>>; | |
fn HasFocus(&self) -> bool; | |
fn GetOnreadystatechange(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnreadystatechange(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn FgColor(&self) -> DOMString; | |
fn SetFgColor(&self, value: DOMString) -> (); | |
fn BgColor(&self) -> DOMString; | |
fn SetBgColor(&self, value: DOMString) -> (); | |
fn Anchors(&self) -> Root<HTMLCollection>; | |
fn Applets(&self) -> Root<HTMLCollection>; | |
fn Clear(&self) -> (); | |
fn CaptureEvents(&self) -> (); | |
fn ReleaseEvents(&self) -> (); | |
fn CreateTouch(&self, view: &Window, target: &EventTarget, identifier: i32, pageX: Finite<f64>, pageY: Finite<f64>, screenX: Finite<f64>, screenY: Finite<f64>) -> Root<Touch>; | |
fn CreateTouchList(&self, touches: &[&Touch]) -> Root<TouchList>; | |
fn ElementFromPoint(&self, x: Finite<f64>, y: Finite<f64>) -> Option<Root<Element>>; | |
fn ElementsFromPoint(&self, x: Finite<f64>, y: Finite<f64>) -> Vec<Root<Element>>; | |
fn StyleSheets(&self) -> Root<StyleSheetList>; | |
fn GetOncopy(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOncopy(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOncut(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOncut(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnpaste(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnpaste(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnabort(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnabort(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnblur(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnblur(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOncancel(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOncancel(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOncanplay(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOncanplay(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOncanplaythrough(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOncanplaythrough(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnchange(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnchange(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnclick(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnclick(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnclose(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnclose(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOncontextmenu(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOncontextmenu(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOncuechange(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOncuechange(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOndblclick(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOndblclick(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOndrag(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOndrag(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOndragend(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOndragend(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOndragenter(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOndragenter(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOndragexit(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOndragexit(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOndragleave(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOndragleave(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOndragover(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOndragover(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOndragstart(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOndragstart(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOndrop(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOndrop(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOndurationchange(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOndurationchange(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnemptied(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnemptied(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnended(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnended(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnerror(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::OnErrorEventHandlerNonNull>>; | |
fn SetOnerror(&self, value: Option<Rc<OnErrorEventHandlerNonNull>>) -> (); | |
fn GetOnfocus(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnfocus(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOninput(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOninput(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOninvalid(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOninvalid(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnkeydown(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnkeydown(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnkeypress(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnkeypress(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnkeyup(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnkeyup(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnload(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnload(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnloadeddata(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnloadeddata(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnloadedmetadata(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnloadedmetadata(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnloadstart(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnloadstart(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnmousedown(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnmousedown(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnmouseenter(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnmouseenter(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnmouseleave(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnmouseleave(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnmousemove(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnmousemove(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnmouseout(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnmouseout(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnmouseover(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnmouseover(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnmouseup(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnmouseup(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnwheel(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnwheel(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnpause(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnpause(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnplay(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnplay(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnplaying(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnplaying(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnprogress(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnprogress(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnratechange(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnratechange(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnreset(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnreset(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnresize(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnresize(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnscroll(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnscroll(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnseeked(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnseeked(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnseeking(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnseeking(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnselect(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnselect(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnshow(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnshow(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnstalled(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnstalled(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnsubmit(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnsubmit(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnsuspend(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnsuspend(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOntimeupdate(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOntimeupdate(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOntoggle(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOntoggle(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnvolumechange(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnvolumechange(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOnwaiting(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOnwaiting(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetOntransitionend(&self) -> Option<Rc<dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull>>; | |
fn SetOntransitionend(&self, value: Option<Rc<EventHandlerNonNull>>) -> (); | |
fn GetElementById(&self, elementId: DOMString) -> Option<Root<Element>>; | |
fn Children(&self) -> Root<HTMLCollection>; | |
fn GetFirstElementChild(&self) -> Option<Root<Element>>; | |
fn GetLastElementChild(&self) -> Option<Root<Element>>; | |
fn ChildElementCount(&self) -> u32; | |
fn Prepend(&self, nodes: Vec<UnionTypes::NodeOrString>) -> Fallible<()>; | |
fn Append(&self, nodes: Vec<UnionTypes::NodeOrString>) -> Fallible<()>; | |
fn QuerySelector(&self, selectors: DOMString) -> Fallible<Option<Root<Element>>>; | |
fn QuerySelectorAll(&self, selectors: DOMString) -> Fallible<Root<NodeList>>; | |
fn SupportedPropertyNames(&self) -> Vec<DOMString>; | |
unsafe fn NamedGetter(&self, cx: *mut JSContext, name: DOMString) -> Option<NonZero<*mut JSObject>>; | |
} | |
impl WeakReferenceable for Document {} | |
const sMethods_specs: &'static [&'static[JSFunctionSpec]] = &[ | |
&[ | |
JSFunctionSpec { | |
name: b"getElementsByTagName\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &getElementsByTagName_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 1, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"getElementsByTagNameNS\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &getElementsByTagNameNS_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 2, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"getElementsByClassName\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &getElementsByClassName_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 1, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"createElement\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &createElement_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 1, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"createElementNS\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &createElementNS_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 2, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"createDocumentFragment\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &createDocumentFragment_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 0, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"createTextNode\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &createTextNode_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 1, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"createComment\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &createComment_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 1, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"createProcessingInstruction\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &createProcessingInstruction_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 2, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"importNode\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &importNode_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 1, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"adoptNode\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &adoptNode_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 1, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"createAttribute\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &createAttribute_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 1, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"createAttributeNS\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &createAttributeNS_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 2, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"createEvent\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &createEvent_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 1, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"createRange\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &createRange_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 0, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"createNodeIterator\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &createNodeIterator_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 1, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"createTreeWalker\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &createTreeWalker_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 1, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"getElementsByName\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &getElementsByName_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 1, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"hasFocus\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &hasFocus_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 0, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"clear\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &clear_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 0, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"captureEvents\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &captureEvents_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 0, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"releaseEvents\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &releaseEvents_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 0, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"createTouch\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &createTouch_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 7, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"createTouchList\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &createTouchList_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 0, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"elementFromPoint\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &elementFromPoint_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 2, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"elementsFromPoint\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &elementsFromPoint_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 2, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"getElementById\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &getElementById_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 1, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"prepend\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &prepend_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 0, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"append\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &append_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 0, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"querySelector\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &querySelector_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 1, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: b"querySelectorAll\0" as *const u8 as *const libc::c_char, | |
call: JSNativeWrapper { op: Some(generic_method), info: &querySelectorAll_methodinfo as *const _ as *const JSJitInfo }, | |
nargs: 1, | |
flags: (JSPROP_ENUMERATE) as u16, | |
selfHostedName: 0 as *const libc::c_char | |
}, | |
JSFunctionSpec { | |
name: 0 as *const libc::c_char, | |
call: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo }, | |
nargs: 0, | |
flags: 0, | |
selfHostedName: 0 as *const libc::c_char | |
}] | |
]; | |
const sMethods: &'static [Guard<&'static [JSFunctionSpec]>] = &[ | |
Guard::new(Condition::Satisfied, sMethods_specs[0]) | |
]; | |
const sAttributes_specs: &'static [&'static[JSPropertySpec]] = &[ | |
&[ | |
JSPropertySpec { | |
name: b"implementation\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &implementation_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"URL\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &URL_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"documentURI\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &documentURI_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"compatMode\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &compatMode_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"characterSet\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &characterSet_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"charset\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &charset_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"inputEncoding\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &inputEncoding_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"contentType\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &contentType_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"doctype\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &doctype_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"documentElement\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &documentElement_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"domain\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &domain_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"referrer\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &referrer_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"cookie\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &cookie_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &cookie_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"lastModified\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &lastModified_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"readyState\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &readyState_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"title\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &title_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &title_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"body\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &body_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &body_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"head\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &head_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"images\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &images_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"embeds\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &embeds_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"plugins\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &plugins_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"links\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &links_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"forms\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &forms_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"scripts\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &scripts_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"currentScript\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: ¤tScript_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"defaultView\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &defaultView_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"activeElement\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &activeElement_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"onreadystatechange\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_lenient_getter), info: &onreadystatechange_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_lenient_setter), info: &onreadystatechange_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"fgColor\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &fgColor_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &fgColor_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"bgColor\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &bgColor_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &bgColor_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"anchors\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &anchors_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"applets\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &applets_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"styleSheets\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &styleSheets_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"oncopy\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &oncopy_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &oncopy_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"oncut\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &oncut_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &oncut_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onpaste\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onpaste_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onpaste_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onabort\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onabort_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onabort_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onblur\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onblur_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onblur_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"oncancel\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &oncancel_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &oncancel_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"oncanplay\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &oncanplay_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &oncanplay_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"oncanplaythrough\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &oncanplaythrough_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &oncanplaythrough_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onchange\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onchange_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onchange_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onclick\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onclick_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onclick_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onclose\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onclose_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onclose_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"oncontextmenu\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &oncontextmenu_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &oncontextmenu_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"oncuechange\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &oncuechange_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &oncuechange_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"ondblclick\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &ondblclick_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &ondblclick_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"ondrag\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &ondrag_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &ondrag_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"ondragend\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &ondragend_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &ondragend_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"ondragenter\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &ondragenter_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &ondragenter_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"ondragexit\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &ondragexit_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &ondragexit_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"ondragleave\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &ondragleave_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &ondragleave_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"ondragover\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &ondragover_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &ondragover_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"ondragstart\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &ondragstart_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &ondragstart_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"ondrop\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &ondrop_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &ondrop_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"ondurationchange\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &ondurationchange_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &ondurationchange_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onemptied\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onemptied_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onemptied_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onended\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onended_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onended_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onerror\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onerror_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onerror_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onfocus\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onfocus_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onfocus_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"oninput\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &oninput_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &oninput_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"oninvalid\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &oninvalid_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &oninvalid_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onkeydown\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onkeydown_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onkeydown_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onkeypress\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onkeypress_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onkeypress_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onkeyup\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onkeyup_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onkeyup_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onload\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onload_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onload_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onloadeddata\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onloadeddata_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onloadeddata_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onloadedmetadata\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onloadedmetadata_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onloadedmetadata_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onloadstart\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onloadstart_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onloadstart_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onmousedown\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onmousedown_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onmousedown_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onmouseenter\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_lenient_getter), info: &onmouseenter_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_lenient_setter), info: &onmouseenter_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onmouseleave\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_lenient_getter), info: &onmouseleave_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_lenient_setter), info: &onmouseleave_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onmousemove\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onmousemove_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onmousemove_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onmouseout\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onmouseout_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onmouseout_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onmouseover\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onmouseover_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onmouseover_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onmouseup\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onmouseup_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onmouseup_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onwheel\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onwheel_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onwheel_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onpause\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onpause_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onpause_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onplay\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onplay_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onplay_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onplaying\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onplaying_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onplaying_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onprogress\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onprogress_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onprogress_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onratechange\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onratechange_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onratechange_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onreset\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onreset_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onreset_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onresize\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onresize_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onresize_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onscroll\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onscroll_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onscroll_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onseeked\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onseeked_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onseeked_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onseeking\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onseeking_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onseeking_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onselect\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onselect_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onselect_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onshow\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onshow_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onshow_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onstalled\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onstalled_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onstalled_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onsubmit\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onsubmit_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onsubmit_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onsuspend\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onsuspend_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onsuspend_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"ontimeupdate\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &ontimeupdate_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &ontimeupdate_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"ontoggle\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &ontoggle_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &ontoggle_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onvolumechange\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onvolumechange_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onvolumechange_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"onwaiting\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &onwaiting_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &onwaiting_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"ontransitionend\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &ontransitionend_getterinfo }, | |
setter: JSNativeWrapper { op: Some(generic_setter), info: &ontransitionend_setterinfo } | |
}, | |
JSPropertySpec { | |
name: b"children\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &children_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"firstElementChild\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &firstElementChild_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"lastElementChild\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &lastElementChild_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: b"childElementCount\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &childElementCount_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: 0 as *const libc::c_char, | |
flags: 0, | |
getter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}] | |
]; | |
const sAttributes: &'static [Guard<&'static [JSPropertySpec]>] = &[ | |
Guard::new(Condition::Satisfied, sAttributes_specs[0]) | |
]; | |
const sUnforgeableAttributes_specs: &'static [&'static[JSPropertySpec]] = &[ | |
&[ | |
JSPropertySpec { | |
name: b"location\0" as *const u8 as *const libc::c_char, | |
flags: (JSPROP_ENUMERATE | JSPROP_SHARED | JSPROP_PERMANENT) as u8, | |
getter: JSNativeWrapper { op: Some(generic_getter), info: &location_getterinfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}, | |
JSPropertySpec { | |
name: 0 as *const libc::c_char, | |
flags: 0, | |
getter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo }, | |
setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo } | |
}] | |
]; | |
const sUnforgeableAttributes: &'static [Guard<&'static [JSPropertySpec]>] = &[ | |
Guard::new(Condition::Satisfied, sUnforgeableAttributes_specs[0]) | |
]; | |
pub unsafe fn GetProtoObject(cx: *mut JSContext, global: HandleObject, rval: MutableHandleObject) { | |
/* Get the interface prototype object for this class. This will create the | |
object as needed. */ | |
assert!(((*JS_GetClass(global.get())).flags & JSCLASS_DOM_GLOBAL) != 0); | |
/* Check to see whether the interface objects are already installed */ | |
let proto_or_iface_array = get_proto_or_iface_array(global.get()); | |
rval.set((*proto_or_iface_array)[PrototypeList::ID::Document as usize]); | |
if !rval.get().is_null() { | |
return; | |
} | |
CreateInterfaceObjects(cx, global, proto_or_iface_array); | |
rval.set((*proto_or_iface_array)[PrototypeList::ID::Document as usize]); | |
assert!(!rval.get().is_null()); | |
} | |
static PrototypeClass: JSClass = JSClass { | |
name: b"DocumentPrototype\0" as *const u8 as *const libc::c_char, | |
flags: | |
// JSCLASS_HAS_RESERVED_SLOTS(1) | |
(1 & JSCLASS_RESERVED_SLOTS_MASK) << JSCLASS_RESERVED_SLOTS_SHIFT, | |
cOps: 0 as *const _, | |
reserved: [0 as *mut os::raw::c_void; 3] | |
}; | |
unsafe extern fn _constructor(cx: *mut JSContext, argc: u32, vp: *mut JSVal) -> bool { | |
return wrap_panic(|| { | |
let global = GlobalScope::from_object(JS_CALLEE(cx, vp).to_object()); | |
let args = CallArgs::from_vp(vp, argc); | |
let result: Result<Root<Document>, Error> = Document::Constructor(&global); | |
let result = match result { | |
Ok(result) => result, | |
Err(e) => { | |
throw_dom_exception(cx, &global, e); | |
return false; | |
}, | |
}; | |
(result).to_jsval(cx, args.rval()); | |
return true;}, false); | |
} | |
static INTERFACE_OBJECT_CLASS: NonCallbackInterfaceObjectClass = | |
NonCallbackInterfaceObjectClass::new( | |
&InterfaceConstructorBehavior::call(_constructor), | |
b"function Document() {\n [native code]\n}", | |
PrototypeList::ID::Document, | |
2); | |
pub unsafe fn GetConstructorObject(cx: *mut JSContext, global: HandleObject, rval: MutableHandleObject) { | |
/* Get the interface object for this class. This will create the object as | |
needed. */ | |
assert!(((*JS_GetClass(global.get())).flags & JSCLASS_DOM_GLOBAL) != 0); | |
/* Check to see whether the interface objects are already installed */ | |
let proto_or_iface_array = get_proto_or_iface_array(global.get()); | |
rval.set((*proto_or_iface_array)[PrototypeList::Constructor::Document as usize]); | |
if !rval.get().is_null() { | |
return; | |
} | |
CreateInterfaceObjects(cx, global, proto_or_iface_array); | |
rval.set((*proto_or_iface_array)[PrototypeList::Constructor::Document as usize]); | |
assert!(!rval.get().is_null()); | |
} | |
pub unsafe fn DefineDOMInterface(cx: *mut JSContext, global: HandleObject) { | |
assert!(!global.get().is_null()); | |
if !ConstructorEnabled(cx, global) { | |
return; | |
} | |
rooted!(in(cx) let mut proto = ptr::null_mut()); | |
GetProtoObject(cx, global, proto.handle_mut()); | |
assert!(!proto.is_null()); | |
} | |
unsafe fn ConstructorEnabled(aCx: *mut JSContext, aObj: HandleObject) -> bool { | |
is_exposed_in(aObj, InterfaceObjectMap::WINDOW) | |
} | |
unsafe fn CreateInterfaceObjects(cx: *mut JSContext, global: HandleObject, cache: *mut ProtoOrIfaceArray) { | |
rooted!(in(cx) let mut prototype_proto = ptr::null_mut()); | |
NodeBinding::GetProtoObject(cx, global, prototype_proto.handle_mut()); | |
assert!(!prototype_proto.is_null()); | |
rooted!(in(cx) let mut prototype = ptr::null_mut()); | |
create_interface_prototype_object(cx, | |
prototype_proto.handle(), | |
&PrototypeClass, | |
sMethods, | |
sAttributes, | |
&[], | |
unscopable_names, | |
prototype.handle_mut()); | |
assert!(!prototype.is_null()); | |
assert!((*cache)[PrototypeList::ID::Document as usize].is_null()); | |
(*cache)[PrototypeList::ID::Document as usize] = prototype.get(); | |
<*mut JSObject>::post_barrier((*cache).as_mut_ptr().offset(PrototypeList::ID::Document as isize), | |
ptr::null_mut(), | |
prototype.get()); | |
rooted!(in(cx) let mut interface_proto = ptr::null_mut()); | |
NodeBinding::GetConstructorObject(cx, global, interface_proto.handle_mut()); | |
assert!(!interface_proto.is_null()); | |
rooted!(in(cx) let mut interface = ptr::null_mut()); | |
create_noncallback_interface_object(cx, | |
global, | |
interface_proto.handle(), | |
&INTERFACE_OBJECT_CLASS, | |
&[], | |
&[], | |
&[], | |
prototype.handle(), | |
b"Document\0", | |
0, | |
interface.handle_mut()); | |
assert!(!interface.is_null()); | |
assert!((*cache)[PrototypeList::Constructor::Document as usize].is_null()); | |
(*cache)[PrototypeList::Constructor::Document as usize] = interface.get(); | |
<*mut JSObject>::post_barrier((*cache).as_mut_ptr().offset(PrototypeList::Constructor::Document as isize), | |
ptr::null_mut(), | |
interface.get()); | |
rooted!(in(cx) let mut unforgeable_holder = ptr::null_mut()); | |
unforgeable_holder.handle_mut().set( | |
JS_NewObjectWithoutMetadata(cx, ptr::null(), HandleObject::null())); | |
assert!(!unforgeable_holder.is_null()); | |
define_guarded_properties(cx, unforgeable_holder.handle(), sUnforgeableAttributes); | |
JS_SetReservedSlot(prototype.get(), DOM_PROTO_UNFORGEABLE_HOLDER_SLOT, | |
ObjectValue(unforgeable_holder.get())) | |
} | |
} // mod DocumentBinding | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment