script_bindings/home/runner/work/servo/servo/target/debug/build/script_bindings-d55f55d5af1efaee/out/Bindings/
HTMLIFrameElementBinding.rs

1/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */
2
3#![allow(non_camel_case_types,non_upper_case_globals,unsafe_op_in_unsafe_fn,unused_imports,unused_variables,unused_assignments,unused_mut,clippy::approx_constant,clippy::enum_variant_names,clippy::let_unit_value,clippy::needless_return,clippy::too_many_arguments,clippy::unnecessary_cast,clippy::upper_case_acronyms)]
4
5use crate::codegen::GenericBindings::ElementBinding::Element_Binding;
6use crate::codegen::GenericBindings::EventTargetBinding::EventTarget_Binding;
7use crate::codegen::GenericBindings::HTMLElementBinding::HTMLElement_Binding;
8use crate::codegen::GenericBindings::NodeBinding::Node_Binding;
9use crate::import::base::*;
10
11pub use self::HTMLIFrameElement_Binding::{Wrap, HTMLIFrameElementMethods, GetProtoObject, GetConstructorObject, DefineDOMInterface};
12pub mod HTMLIFrameElement_Binding {
13use crate::codegen::GenericBindings::ElementBinding::Element_Binding;
14use crate::codegen::GenericBindings::EventTargetBinding::EventTarget_Binding;
15use crate::codegen::GenericBindings::HTMLElementBinding::HTMLElement_Binding;
16use crate::codegen::GenericBindings::NodeBinding::Node_Binding;
17use crate::import::module::*;
18
19unsafe extern "C" fn get_src<D: DomTypes>
20(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
21    let mut result = false;
22    wrap_panic(&mut || result = (|| {
23        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
24        let this = &*(this as *const D::HTMLIFrameElement);
25        <D as DomHelpers<D>>::push_new_element_queue();
26
27        let result: USVString = this.Src();
28        <D as DomHelpers<D>>::pop_current_element_queue(CanGc::note());
29
30
31        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
32        return true;
33    })());
34    result
35}
36
37unsafe extern "C" fn set_src<D: DomTypes>
38(cx: *mut RawJSContext, obj: RawHandleObject, this: *mut libc::c_void, args: JSJitSetterCallArgs) -> bool{
39    let mut result = false;
40    wrap_panic(&mut || result = (|| {
41        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
42        let this = &*(this as *const D::HTMLIFrameElement);
43        let arg0: USVString = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(0)), ()) {
44            Ok(ConversionResult::Success(value)) => value,
45            Ok(ConversionResult::Failure(error)) => {
46                throw_type_error(cx.raw_cx(), &error);
47        return false;
48
49            }
50            _ => {
51                return false;
52
53            },
54        }
55        ;
56        <D as DomHelpers<D>>::push_new_element_queue();
57
58        let result: () = this.SetSrc(arg0);
59        <D as DomHelpers<D>>::pop_current_element_queue(CanGc::note());
60
61
62        true
63    })());
64    result
65}
66
67
68static src_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
69
70pub(crate) fn init_src_getterinfo<D: DomTypes>() {
71    src_getterinfo.set(JSJitInfo {
72    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
73        getter: Some(get_src::<D>)
74    },
75    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
76        protoID: PrototypeList::ID::HTMLIFrameElement as u16,
77    },
78    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
79    _bitfield_align_1: [],
80    _bitfield_1: __BindgenBitfieldUnit::new(
81        new_jsjitinfo_bitfield_1!(
82            JSJitInfo_OpType::Getter as u8,
83            JSJitInfo_AliasSet::AliasEverything as u8,
84            JSValueType::JSVAL_TYPE_STRING as u8,
85            true,
86            false,
87            false,
88            false,
89            false,
90            false,
91            0,
92        ).to_ne_bytes()
93    ),
94});
95}
96static src_setterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
97
98pub(crate) fn init_src_setterinfo<D: DomTypes>() {
99    src_setterinfo.set(JSJitInfo {
100    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
101        setter: Some(set_src::<D>)
102    },
103    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
104        protoID: PrototypeList::ID::HTMLIFrameElement as u16,
105    },
106    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
107    _bitfield_align_1: [],
108    _bitfield_1: __BindgenBitfieldUnit::new(
109        new_jsjitinfo_bitfield_1!(
110            JSJitInfo_OpType::Setter as u8,
111            JSJitInfo_AliasSet::AliasEverything as u8,
112            JSValueType::JSVAL_TYPE_UNDEFINED as u8,
113            false,
114            false,
115            false,
116            false,
117            false,
118            false,
119            0,
120        ).to_ne_bytes()
121    ),
122});
123}
124unsafe extern "C" fn get_srcdoc<D: DomTypes>
125(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
126    let mut result = false;
127    wrap_panic(&mut || result = (|| {
128        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
129        let this = &*(this as *const D::HTMLIFrameElement);
130        <D as DomHelpers<D>>::push_new_element_queue();
131
132        let result: GenericUnionTypes::TrustedHTMLOrString::<D> = this.Srcdoc();
133        <D as DomHelpers<D>>::pop_current_element_queue(CanGc::note());
134
135
136        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
137        return true;
138    })());
139    result
140}
141
142unsafe extern "C" fn set_srcdoc<D: DomTypes>
143(cx: *mut RawJSContext, obj: RawHandleObject, this: *mut libc::c_void, args: JSJitSetterCallArgs) -> bool{
144    let mut result = false;
145    wrap_panic(&mut || result = (|| {
146        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
147        let this = &*(this as *const D::HTMLIFrameElement);
148        let arg0: GenericUnionTypes::TrustedHTMLOrString::<D> = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(0)), ()) {
149            Ok(ConversionResult::Success(value)) => value,
150            Ok(ConversionResult::Failure(error)) => {
151                throw_type_error(cx.raw_cx(), &error);
152        return false;
153
154            }
155            _ => {
156                return false;
157
158            },
159        }
160        ;
161        <D as DomHelpers<D>>::push_new_element_queue();
162
163        let result: Result<(), Error> = this.SetSrcdoc(arg0, CanGc::note());
164        <D as DomHelpers<D>>::pop_current_element_queue(CanGc::note());
165
166        let result = match result {
167            Ok(result) => result,
168            Err(e) => {
169                <D as DomHelpers<D>>::throw_dom_exception(SafeJSContext::from_ptr(cx.raw_cx()), &this.global_(InRealm::already(&AlreadyInRealm::assert_for_cx(SafeJSContext::from_ptr(cx.raw_cx())))), e, CanGc::note());
170                return false;
171            },
172        };
173
174        true
175    })());
176    result
177}
178
179
180static srcdoc_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
181
182pub(crate) fn init_srcdoc_getterinfo<D: DomTypes>() {
183    srcdoc_getterinfo.set(JSJitInfo {
184    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
185        getter: Some(get_srcdoc::<D>)
186    },
187    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
188        protoID: PrototypeList::ID::HTMLIFrameElement as u16,
189    },
190    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
191    _bitfield_align_1: [],
192    _bitfield_1: __BindgenBitfieldUnit::new(
193        new_jsjitinfo_bitfield_1!(
194            JSJitInfo_OpType::Getter as u8,
195            JSJitInfo_AliasSet::AliasEverything as u8,
196            JSValueType::JSVAL_TYPE_UNKNOWN as u8,
197            true,
198            false,
199            false,
200            false,
201            false,
202            false,
203            0,
204        ).to_ne_bytes()
205    ),
206});
207}
208static srcdoc_setterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
209
210pub(crate) fn init_srcdoc_setterinfo<D: DomTypes>() {
211    srcdoc_setterinfo.set(JSJitInfo {
212    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
213        setter: Some(set_srcdoc::<D>)
214    },
215    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
216        protoID: PrototypeList::ID::HTMLIFrameElement as u16,
217    },
218    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
219    _bitfield_align_1: [],
220    _bitfield_1: __BindgenBitfieldUnit::new(
221        new_jsjitinfo_bitfield_1!(
222            JSJitInfo_OpType::Setter as u8,
223            JSJitInfo_AliasSet::AliasEverything as u8,
224            JSValueType::JSVAL_TYPE_UNDEFINED as u8,
225            false,
226            false,
227            false,
228            false,
229            false,
230            false,
231            0,
232        ).to_ne_bytes()
233    ),
234});
235}
236unsafe extern "C" fn get_name<D: DomTypes>
237(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
238    let mut result = false;
239    wrap_panic(&mut || result = (|| {
240        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
241        let this = &*(this as *const D::HTMLIFrameElement);
242        <D as DomHelpers<D>>::push_new_element_queue();
243
244        let result: DOMString = this.Name();
245        <D as DomHelpers<D>>::pop_current_element_queue(CanGc::note());
246
247
248        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
249        return true;
250    })());
251    result
252}
253
254unsafe extern "C" fn set_name<D: DomTypes>
255(cx: *mut RawJSContext, obj: RawHandleObject, this: *mut libc::c_void, args: JSJitSetterCallArgs) -> bool{
256    let mut result = false;
257    wrap_panic(&mut || result = (|| {
258        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
259        let this = &*(this as *const D::HTMLIFrameElement);
260        let arg0: DOMString = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(0)), StringificationBehavior::Default) {
261            Ok(ConversionResult::Success(value)) => value,
262            Ok(ConversionResult::Failure(error)) => {
263                throw_type_error(cx.raw_cx(), &error);
264        return false;
265
266            }
267            _ => {
268                return false;
269
270            },
271        }
272        ;
273        <D as DomHelpers<D>>::push_new_element_queue();
274
275        let result: () = this.SetName(arg0);
276        <D as DomHelpers<D>>::pop_current_element_queue(CanGc::note());
277
278
279        true
280    })());
281    result
282}
283
284
285static name_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
286
287pub(crate) fn init_name_getterinfo<D: DomTypes>() {
288    name_getterinfo.set(JSJitInfo {
289    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
290        getter: Some(get_name::<D>)
291    },
292    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
293        protoID: PrototypeList::ID::HTMLIFrameElement as u16,
294    },
295    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
296    _bitfield_align_1: [],
297    _bitfield_1: __BindgenBitfieldUnit::new(
298        new_jsjitinfo_bitfield_1!(
299            JSJitInfo_OpType::Getter as u8,
300            JSJitInfo_AliasSet::AliasEverything as u8,
301            JSValueType::JSVAL_TYPE_STRING as u8,
302            true,
303            false,
304            false,
305            false,
306            false,
307            false,
308            0,
309        ).to_ne_bytes()
310    ),
311});
312}
313static name_setterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
314
315pub(crate) fn init_name_setterinfo<D: DomTypes>() {
316    name_setterinfo.set(JSJitInfo {
317    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
318        setter: Some(set_name::<D>)
319    },
320    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
321        protoID: PrototypeList::ID::HTMLIFrameElement as u16,
322    },
323    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
324    _bitfield_align_1: [],
325    _bitfield_1: __BindgenBitfieldUnit::new(
326        new_jsjitinfo_bitfield_1!(
327            JSJitInfo_OpType::Setter as u8,
328            JSJitInfo_AliasSet::AliasEverything as u8,
329            JSValueType::JSVAL_TYPE_UNDEFINED as u8,
330            false,
331            false,
332            false,
333            false,
334            false,
335            false,
336            0,
337        ).to_ne_bytes()
338    ),
339});
340}
341unsafe extern "C" fn get_sandbox<D: DomTypes>
342(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
343    let mut result = false;
344    wrap_panic(&mut || result = (|| {
345        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
346        let this = &*(this as *const D::HTMLIFrameElement);
347        let result: DomRoot<D::DOMTokenList> = this.Sandbox(CanGc::note());
348
349        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
350        return true;
351    })());
352    result
353}
354
355unsafe extern "C" fn set_sandbox<D: DomTypes>
356(cx: *mut RawJSContext, obj: RawHandleObject, this: *mut libc::c_void, args: JSJitSetterCallArgs) -> bool{
357    let mut result = false;
358    wrap_panic(&mut || result = (|| {
359
360        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
361        rooted!(&in(cx) let mut v = UndefinedValue());
362        if !JS_GetProperty(cx.raw_cx(), HandleObject::from_raw(obj), c"sandbox".as_ptr(), v.handle_mut()) {
363            return false;
364        }
365        if !v.is_object() {
366            throw_type_error(cx.raw_cx(), "Value.sandbox is not an object.");
367            return false;
368        }
369        rooted!(&in(cx) let target_obj = v.to_object());
370        JS_SetProperty(cx.raw_cx(), target_obj.handle(), c"value".as_ptr(), HandleValue::from_raw(args.get(0)))
371
372    })());
373    result
374}
375
376
377static sandbox_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
378
379pub(crate) fn init_sandbox_getterinfo<D: DomTypes>() {
380    sandbox_getterinfo.set(JSJitInfo {
381    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
382        getter: Some(get_sandbox::<D>)
383    },
384    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
385        protoID: PrototypeList::ID::HTMLIFrameElement as u16,
386    },
387    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
388    _bitfield_align_1: [],
389    _bitfield_1: __BindgenBitfieldUnit::new(
390        new_jsjitinfo_bitfield_1!(
391            JSJitInfo_OpType::Getter as u8,
392            JSJitInfo_AliasSet::AliasNone as u8,
393            JSValueType::JSVAL_TYPE_OBJECT as u8,
394            true,
395            true,
396            false,
397            false,
398            false,
399            false,
400            0,
401        ).to_ne_bytes()
402    ),
403});
404}
405static sandbox_setterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
406
407pub(crate) fn init_sandbox_setterinfo<D: DomTypes>() {
408    sandbox_setterinfo.set(JSJitInfo {
409    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
410        setter: Some(set_sandbox::<D>)
411    },
412    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
413        protoID: PrototypeList::ID::HTMLIFrameElement as u16,
414    },
415    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
416    _bitfield_align_1: [],
417    _bitfield_1: __BindgenBitfieldUnit::new(
418        new_jsjitinfo_bitfield_1!(
419            JSJitInfo_OpType::Setter as u8,
420            JSJitInfo_AliasSet::AliasEverything as u8,
421            JSValueType::JSVAL_TYPE_UNDEFINED as u8,
422            false,
423            false,
424            false,
425            false,
426            false,
427            false,
428            0,
429        ).to_ne_bytes()
430    ),
431});
432}
433unsafe extern "C" fn get_allowFullscreen<D: DomTypes>
434(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
435    let mut result = false;
436    wrap_panic(&mut || result = (|| {
437        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
438        let this = &*(this as *const D::HTMLIFrameElement);
439        <D as DomHelpers<D>>::push_new_element_queue();
440
441        let result: bool = this.AllowFullscreen();
442        <D as DomHelpers<D>>::pop_current_element_queue(CanGc::note());
443
444
445        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
446        return true;
447    })());
448    result
449}
450
451unsafe extern "C" fn set_allowFullscreen<D: DomTypes>
452(cx: *mut RawJSContext, obj: RawHandleObject, this: *mut libc::c_void, args: JSJitSetterCallArgs) -> bool{
453    let mut result = false;
454    wrap_panic(&mut || result = (|| {
455        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
456        let this = &*(this as *const D::HTMLIFrameElement);
457        let arg0: bool = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(0)), ()) {
458            Ok(ConversionResult::Success(value)) => value,
459            Ok(ConversionResult::Failure(error)) => {
460                throw_type_error(cx.raw_cx(), &error);
461        return false;
462
463            }
464            _ => {
465                return false;
466
467            },
468        }
469        ;
470        <D as DomHelpers<D>>::push_new_element_queue();
471
472        let result: () = this.SetAllowFullscreen(arg0);
473        <D as DomHelpers<D>>::pop_current_element_queue(CanGc::note());
474
475
476        true
477    })());
478    result
479}
480
481
482static allowFullscreen_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
483
484pub(crate) fn init_allowFullscreen_getterinfo<D: DomTypes>() {
485    allowFullscreen_getterinfo.set(JSJitInfo {
486    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
487        getter: Some(get_allowFullscreen::<D>)
488    },
489    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
490        protoID: PrototypeList::ID::HTMLIFrameElement as u16,
491    },
492    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
493    _bitfield_align_1: [],
494    _bitfield_1: __BindgenBitfieldUnit::new(
495        new_jsjitinfo_bitfield_1!(
496            JSJitInfo_OpType::Getter as u8,
497            JSJitInfo_AliasSet::AliasEverything as u8,
498            JSValueType::JSVAL_TYPE_BOOLEAN as u8,
499            true,
500            false,
501            false,
502            false,
503            false,
504            false,
505            0,
506        ).to_ne_bytes()
507    ),
508});
509}
510static allowFullscreen_setterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
511
512pub(crate) fn init_allowFullscreen_setterinfo<D: DomTypes>() {
513    allowFullscreen_setterinfo.set(JSJitInfo {
514    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
515        setter: Some(set_allowFullscreen::<D>)
516    },
517    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
518        protoID: PrototypeList::ID::HTMLIFrameElement as u16,
519    },
520    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
521    _bitfield_align_1: [],
522    _bitfield_1: __BindgenBitfieldUnit::new(
523        new_jsjitinfo_bitfield_1!(
524            JSJitInfo_OpType::Setter as u8,
525            JSJitInfo_AliasSet::AliasEverything as u8,
526            JSValueType::JSVAL_TYPE_UNDEFINED as u8,
527            false,
528            false,
529            false,
530            false,
531            false,
532            false,
533            0,
534        ).to_ne_bytes()
535    ),
536});
537}
538unsafe extern "C" fn get_width<D: DomTypes>
539(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
540    let mut result = false;
541    wrap_panic(&mut || result = (|| {
542        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
543        let this = &*(this as *const D::HTMLIFrameElement);
544        <D as DomHelpers<D>>::push_new_element_queue();
545
546        let result: DOMString = this.Width();
547        <D as DomHelpers<D>>::pop_current_element_queue(CanGc::note());
548
549
550        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
551        return true;
552    })());
553    result
554}
555
556unsafe extern "C" fn set_width<D: DomTypes>
557(cx: *mut RawJSContext, obj: RawHandleObject, this: *mut libc::c_void, args: JSJitSetterCallArgs) -> bool{
558    let mut result = false;
559    wrap_panic(&mut || result = (|| {
560        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
561        let this = &*(this as *const D::HTMLIFrameElement);
562        let arg0: DOMString = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(0)), StringificationBehavior::Default) {
563            Ok(ConversionResult::Success(value)) => value,
564            Ok(ConversionResult::Failure(error)) => {
565                throw_type_error(cx.raw_cx(), &error);
566        return false;
567
568            }
569            _ => {
570                return false;
571
572            },
573        }
574        ;
575        <D as DomHelpers<D>>::push_new_element_queue();
576
577        let result: () = this.SetWidth(arg0);
578        <D as DomHelpers<D>>::pop_current_element_queue(CanGc::note());
579
580
581        true
582    })());
583    result
584}
585
586
587static width_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
588
589pub(crate) fn init_width_getterinfo<D: DomTypes>() {
590    width_getterinfo.set(JSJitInfo {
591    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
592        getter: Some(get_width::<D>)
593    },
594    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
595        protoID: PrototypeList::ID::HTMLIFrameElement as u16,
596    },
597    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
598    _bitfield_align_1: [],
599    _bitfield_1: __BindgenBitfieldUnit::new(
600        new_jsjitinfo_bitfield_1!(
601            JSJitInfo_OpType::Getter as u8,
602            JSJitInfo_AliasSet::AliasEverything as u8,
603            JSValueType::JSVAL_TYPE_STRING as u8,
604            true,
605            false,
606            false,
607            false,
608            false,
609            false,
610            0,
611        ).to_ne_bytes()
612    ),
613});
614}
615static width_setterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
616
617pub(crate) fn init_width_setterinfo<D: DomTypes>() {
618    width_setterinfo.set(JSJitInfo {
619    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
620        setter: Some(set_width::<D>)
621    },
622    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
623        protoID: PrototypeList::ID::HTMLIFrameElement as u16,
624    },
625    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
626    _bitfield_align_1: [],
627    _bitfield_1: __BindgenBitfieldUnit::new(
628        new_jsjitinfo_bitfield_1!(
629            JSJitInfo_OpType::Setter as u8,
630            JSJitInfo_AliasSet::AliasEverything as u8,
631            JSValueType::JSVAL_TYPE_UNDEFINED as u8,
632            false,
633            false,
634            false,
635            false,
636            false,
637            false,
638            0,
639        ).to_ne_bytes()
640    ),
641});
642}
643unsafe extern "C" fn get_referrerPolicy<D: DomTypes>
644(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
645    let mut result = false;
646    wrap_panic(&mut || result = (|| {
647        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
648        let this = &*(this as *const D::HTMLIFrameElement);
649        <D as DomHelpers<D>>::push_new_element_queue();
650
651        let result: DOMString = this.ReferrerPolicy();
652        <D as DomHelpers<D>>::pop_current_element_queue(CanGc::note());
653
654
655        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
656        return true;
657    })());
658    result
659}
660
661unsafe extern "C" fn set_referrerPolicy<D: DomTypes>
662(cx: *mut RawJSContext, obj: RawHandleObject, this: *mut libc::c_void, args: JSJitSetterCallArgs) -> bool{
663    let mut result = false;
664    wrap_panic(&mut || result = (|| {
665        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
666        let this = &*(this as *const D::HTMLIFrameElement);
667        let arg0: DOMString = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(0)), StringificationBehavior::Default) {
668            Ok(ConversionResult::Success(value)) => value,
669            Ok(ConversionResult::Failure(error)) => {
670                throw_type_error(cx.raw_cx(), &error);
671        return false;
672
673            }
674            _ => {
675                return false;
676
677            },
678        }
679        ;
680        <D as DomHelpers<D>>::push_new_element_queue();
681
682        let result: () = this.SetReferrerPolicy(arg0);
683        <D as DomHelpers<D>>::pop_current_element_queue(CanGc::note());
684
685
686        true
687    })());
688    result
689}
690
691
692static referrerPolicy_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
693
694pub(crate) fn init_referrerPolicy_getterinfo<D: DomTypes>() {
695    referrerPolicy_getterinfo.set(JSJitInfo {
696    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
697        getter: Some(get_referrerPolicy::<D>)
698    },
699    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
700        protoID: PrototypeList::ID::HTMLIFrameElement as u16,
701    },
702    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
703    _bitfield_align_1: [],
704    _bitfield_1: __BindgenBitfieldUnit::new(
705        new_jsjitinfo_bitfield_1!(
706            JSJitInfo_OpType::Getter as u8,
707            JSJitInfo_AliasSet::AliasEverything as u8,
708            JSValueType::JSVAL_TYPE_STRING as u8,
709            true,
710            false,
711            false,
712            false,
713            false,
714            false,
715            0,
716        ).to_ne_bytes()
717    ),
718});
719}
720static referrerPolicy_setterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
721
722pub(crate) fn init_referrerPolicy_setterinfo<D: DomTypes>() {
723    referrerPolicy_setterinfo.set(JSJitInfo {
724    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
725        setter: Some(set_referrerPolicy::<D>)
726    },
727    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
728        protoID: PrototypeList::ID::HTMLIFrameElement as u16,
729    },
730    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
731    _bitfield_align_1: [],
732    _bitfield_1: __BindgenBitfieldUnit::new(
733        new_jsjitinfo_bitfield_1!(
734            JSJitInfo_OpType::Setter as u8,
735            JSJitInfo_AliasSet::AliasEverything as u8,
736            JSValueType::JSVAL_TYPE_UNDEFINED as u8,
737            false,
738            false,
739            false,
740            false,
741            false,
742            false,
743            0,
744        ).to_ne_bytes()
745    ),
746});
747}
748unsafe extern "C" fn get_height<D: DomTypes>
749(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
750    let mut result = false;
751    wrap_panic(&mut || result = (|| {
752        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
753        let this = &*(this as *const D::HTMLIFrameElement);
754        <D as DomHelpers<D>>::push_new_element_queue();
755
756        let result: DOMString = this.Height();
757        <D as DomHelpers<D>>::pop_current_element_queue(CanGc::note());
758
759
760        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
761        return true;
762    })());
763    result
764}
765
766unsafe extern "C" fn set_height<D: DomTypes>
767(cx: *mut RawJSContext, obj: RawHandleObject, this: *mut libc::c_void, args: JSJitSetterCallArgs) -> bool{
768    let mut result = false;
769    wrap_panic(&mut || result = (|| {
770        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
771        let this = &*(this as *const D::HTMLIFrameElement);
772        let arg0: DOMString = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(0)), StringificationBehavior::Default) {
773            Ok(ConversionResult::Success(value)) => value,
774            Ok(ConversionResult::Failure(error)) => {
775                throw_type_error(cx.raw_cx(), &error);
776        return false;
777
778            }
779            _ => {
780                return false;
781
782            },
783        }
784        ;
785        <D as DomHelpers<D>>::push_new_element_queue();
786
787        let result: () = this.SetHeight(arg0);
788        <D as DomHelpers<D>>::pop_current_element_queue(CanGc::note());
789
790
791        true
792    })());
793    result
794}
795
796
797static height_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
798
799pub(crate) fn init_height_getterinfo<D: DomTypes>() {
800    height_getterinfo.set(JSJitInfo {
801    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
802        getter: Some(get_height::<D>)
803    },
804    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
805        protoID: PrototypeList::ID::HTMLIFrameElement as u16,
806    },
807    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
808    _bitfield_align_1: [],
809    _bitfield_1: __BindgenBitfieldUnit::new(
810        new_jsjitinfo_bitfield_1!(
811            JSJitInfo_OpType::Getter as u8,
812            JSJitInfo_AliasSet::AliasEverything as u8,
813            JSValueType::JSVAL_TYPE_STRING as u8,
814            true,
815            false,
816            false,
817            false,
818            false,
819            false,
820            0,
821        ).to_ne_bytes()
822    ),
823});
824}
825static height_setterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
826
827pub(crate) fn init_height_setterinfo<D: DomTypes>() {
828    height_setterinfo.set(JSJitInfo {
829    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
830        setter: Some(set_height::<D>)
831    },
832    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
833        protoID: PrototypeList::ID::HTMLIFrameElement as u16,
834    },
835    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
836    _bitfield_align_1: [],
837    _bitfield_1: __BindgenBitfieldUnit::new(
838        new_jsjitinfo_bitfield_1!(
839            JSJitInfo_OpType::Setter as u8,
840            JSJitInfo_AliasSet::AliasEverything as u8,
841            JSValueType::JSVAL_TYPE_UNDEFINED as u8,
842            false,
843            false,
844            false,
845            false,
846            false,
847            false,
848            0,
849        ).to_ne_bytes()
850    ),
851});
852}
853unsafe extern "C" fn get_contentDocument<D: DomTypes>
854(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
855    let mut result = false;
856    wrap_panic(&mut || result = (|| {
857        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
858        let this = &*(this as *const D::HTMLIFrameElement);
859        let result: Option<DomRoot<D::Document>> = this.GetContentDocument();
860
861        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
862        return true;
863    })());
864    result
865}
866
867
868static contentDocument_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
869
870pub(crate) fn init_contentDocument_getterinfo<D: DomTypes>() {
871    contentDocument_getterinfo.set(JSJitInfo {
872    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
873        getter: Some(get_contentDocument::<D>)
874    },
875    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
876        protoID: PrototypeList::ID::HTMLIFrameElement as u16,
877    },
878    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
879    _bitfield_align_1: [],
880    _bitfield_1: __BindgenBitfieldUnit::new(
881        new_jsjitinfo_bitfield_1!(
882            JSJitInfo_OpType::Getter as u8,
883            JSJitInfo_AliasSet::AliasEverything as u8,
884            JSValueType::JSVAL_TYPE_UNKNOWN as u8,
885            true,
886            false,
887            false,
888            false,
889            false,
890            false,
891            0,
892        ).to_ne_bytes()
893    ),
894});
895}
896unsafe extern "C" fn get_contentWindow<D: DomTypes>
897(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
898    let mut result = false;
899    wrap_panic(&mut || result = (|| {
900        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
901        let this = &*(this as *const D::HTMLIFrameElement);
902        let result: Option<DomRoot<D::WindowProxy>> = this.GetContentWindow();
903
904        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
905        return true;
906    })());
907    result
908}
909
910
911static contentWindow_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
912
913pub(crate) fn init_contentWindow_getterinfo<D: DomTypes>() {
914    contentWindow_getterinfo.set(JSJitInfo {
915    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
916        getter: Some(get_contentWindow::<D>)
917    },
918    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
919        protoID: PrototypeList::ID::HTMLIFrameElement as u16,
920    },
921    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
922    _bitfield_align_1: [],
923    _bitfield_1: __BindgenBitfieldUnit::new(
924        new_jsjitinfo_bitfield_1!(
925            JSJitInfo_OpType::Getter as u8,
926            JSJitInfo_AliasSet::AliasEverything as u8,
927            JSValueType::JSVAL_TYPE_UNKNOWN as u8,
928            true,
929            false,
930            false,
931            false,
932            false,
933            false,
934            0,
935        ).to_ne_bytes()
936    ),
937});
938}
939unsafe extern "C" fn get_frameBorder<D: DomTypes>
940(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
941    let mut result = false;
942    wrap_panic(&mut || result = (|| {
943        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
944        let this = &*(this as *const D::HTMLIFrameElement);
945        <D as DomHelpers<D>>::push_new_element_queue();
946
947        let result: DOMString = this.FrameBorder();
948        <D as DomHelpers<D>>::pop_current_element_queue(CanGc::note());
949
950
951        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
952        return true;
953    })());
954    result
955}
956
957unsafe extern "C" fn set_frameBorder<D: DomTypes>
958(cx: *mut RawJSContext, obj: RawHandleObject, this: *mut libc::c_void, args: JSJitSetterCallArgs) -> bool{
959    let mut result = false;
960    wrap_panic(&mut || result = (|| {
961        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
962        let this = &*(this as *const D::HTMLIFrameElement);
963        let arg0: DOMString = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(0)), StringificationBehavior::Default) {
964            Ok(ConversionResult::Success(value)) => value,
965            Ok(ConversionResult::Failure(error)) => {
966                throw_type_error(cx.raw_cx(), &error);
967        return false;
968
969            }
970            _ => {
971                return false;
972
973            },
974        }
975        ;
976        <D as DomHelpers<D>>::push_new_element_queue();
977
978        let result: () = this.SetFrameBorder(arg0);
979        <D as DomHelpers<D>>::pop_current_element_queue(CanGc::note());
980
981
982        true
983    })());
984    result
985}
986
987
988static frameBorder_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
989
990pub(crate) fn init_frameBorder_getterinfo<D: DomTypes>() {
991    frameBorder_getterinfo.set(JSJitInfo {
992    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
993        getter: Some(get_frameBorder::<D>)
994    },
995    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
996        protoID: PrototypeList::ID::HTMLIFrameElement as u16,
997    },
998    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
999    _bitfield_align_1: [],
1000    _bitfield_1: __BindgenBitfieldUnit::new(
1001        new_jsjitinfo_bitfield_1!(
1002            JSJitInfo_OpType::Getter as u8,
1003            JSJitInfo_AliasSet::AliasEverything as u8,
1004            JSValueType::JSVAL_TYPE_STRING as u8,
1005            true,
1006            false,
1007            false,
1008            false,
1009            false,
1010            false,
1011            0,
1012        ).to_ne_bytes()
1013    ),
1014});
1015}
1016static frameBorder_setterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
1017
1018pub(crate) fn init_frameBorder_setterinfo<D: DomTypes>() {
1019    frameBorder_setterinfo.set(JSJitInfo {
1020    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
1021        setter: Some(set_frameBorder::<D>)
1022    },
1023    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
1024        protoID: PrototypeList::ID::HTMLIFrameElement as u16,
1025    },
1026    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
1027    _bitfield_align_1: [],
1028    _bitfield_1: __BindgenBitfieldUnit::new(
1029        new_jsjitinfo_bitfield_1!(
1030            JSJitInfo_OpType::Setter as u8,
1031            JSJitInfo_AliasSet::AliasEverything as u8,
1032            JSValueType::JSVAL_TYPE_UNDEFINED as u8,
1033            false,
1034            false,
1035            false,
1036            false,
1037            false,
1038            false,
1039            0,
1040        ).to_ne_bytes()
1041    ),
1042});
1043}
1044unsafe extern "C" fn _finalize<D: DomTypes>
1045(_cx: *mut GCContext, obj: *mut JSObject){
1046    wrap_panic(&mut || {
1047
1048        let this = native_from_object_static::<D::HTMLIFrameElement>(obj).unwrap();
1049        finalize_common(this);
1050    })
1051}
1052
1053unsafe extern "C" fn _trace<D: DomTypes>
1054(trc: *mut JSTracer, obj: *mut JSObject){
1055    wrap_panic(&mut || {
1056
1057        let this = native_from_object_static::<D::HTMLIFrameElement>(obj).unwrap();
1058        if this.is_null() { return; } // GC during obj creation
1059        (*this).trace(trc);
1060    })
1061}
1062
1063
1064static CLASS_OPS: ThreadUnsafeOnceLock<JSClassOps> = ThreadUnsafeOnceLock::new();
1065
1066pub(crate) fn init_class_ops<D: DomTypes>() {
1067    CLASS_OPS.set(JSClassOps {
1068        addProperty: None,
1069        delProperty: None,
1070        enumerate: None,
1071        newEnumerate: None,
1072        resolve: None,
1073        mayResolve: None,
1074        finalize: Some(_finalize::<D>),
1075        call: None,
1076        construct: None,
1077        trace: Some(_trace::<D>),
1078    });
1079}
1080
1081pub static Class: ThreadUnsafeOnceLock<DOMJSClass> = ThreadUnsafeOnceLock::new();
1082
1083pub(crate) fn init_domjs_class<D: DomTypes>() {
1084    init_class_ops::<D>();
1085    Class.set(DOMJSClass {
1086        base: JSClass {
1087            name: c"HTMLIFrameElement".as_ptr(),
1088            flags: JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE |
1089                   (((1) & JSCLASS_RESERVED_SLOTS_MASK) << JSCLASS_RESERVED_SLOTS_SHIFT)
1090                   /* JSCLASS_HAS_RESERVED_SLOTS(1) */,
1091            cOps: unsafe { CLASS_OPS.get() },
1092            spec: ptr::null(),
1093            ext: ptr::null(),
1094            oOps: ptr::null(),
1095        },
1096        dom_class:
1097DOMClass {
1098    interface_chain: [ PrototypeList::ID::EventTarget, PrototypeList::ID::Node, PrototypeList::ID::Element, PrototypeList::ID::HTMLElement, PrototypeList::ID::HTMLIFrameElement, PrototypeList::ID::Last ],
1099    depth: 4,
1100    type_id: crate::codegen::InheritTypes::TopTypeId { eventtarget: (crate::codegen::InheritTypes::EventTargetTypeId::Node(crate::codegen::InheritTypes::NodeTypeId::Element(crate::codegen::InheritTypes::ElementTypeId::HTMLElement(crate::codegen::InheritTypes::HTMLElementTypeId::HTMLIFrameElement)))) },
1101    malloc_size_of: malloc_size_of_including_raw_self::<D::HTMLIFrameElement> as unsafe fn(&mut _, _) -> _,
1102    global: Globals::EMPTY,
1103},
1104    });
1105}
1106
1107#[cfg_attr(crown, allow(crown::unrooted_must_root))] pub unsafe fn Wrap<D: DomTypes>
1108(cx: SafeJSContext, scope: &D::GlobalScope, given_proto: Option<HandleObject>, object: Box<D::HTMLIFrameElement>, _can_gc: CanGc) -> DomRoot<D::HTMLIFrameElement>{
1109
1110    let raw = Root::new(MaybeUnreflectedDom::from_box(object));
1111
1112    let scope = scope.reflector().get_jsobject();
1113    assert!(!scope.get().is_null());
1114    assert!(((*get_object_class(scope.get())).flags & JSCLASS_IS_GLOBAL) != 0);
1115    let _ac = JSAutoRealm::new(cx.raw_cx(), scope.get());
1116
1117    rooted!(&in(cx) let mut canonical_proto = ptr::null_mut::<JSObject>());
1118    GetProtoObject::<D>(cx, scope, canonical_proto.handle_mut());
1119    assert!(!canonical_proto.is_null());
1120
1121
1122    rooted!(&in(cx) let mut proto = ptr::null_mut::<JSObject>());
1123    if let Some(given) = given_proto {
1124        proto.set(*given);
1125        if get_context_realm(cx.raw_cx()) != get_object_realm(*given) {
1126            assert!(JS_WrapObject(cx.raw_cx(), proto.handle_mut()));
1127        }
1128    } else {
1129        proto.set(*canonical_proto);
1130    }
1131    rooted!(&in(cx) let obj = JS_NewObjectWithGivenProto(
1132        cx.raw_cx(),
1133        &Class.get().base,
1134        proto.handle(),
1135    ));
1136    assert!(!obj.is_null());
1137    JS_SetReservedSlot(
1138        obj.get(),
1139        DOM_OBJECT_SLOT,
1140        &PrivateValue(raw.as_ptr() as *const libc::c_void),
1141    );
1142
1143    let root = raw.reflect_with(obj.get());
1144
1145
1146
1147    DomRoot::from_ref(&*root)
1148}
1149
1150pub trait HTMLIFrameElementMethods<D: DomTypes> {
1151    fn Src(&self, ) -> USVString;
1152    fn SetSrc(&self, r#value: USVString);
1153    fn Srcdoc(&self, ) -> GenericUnionTypes::TrustedHTMLOrString::<D>;
1154    fn SetSrcdoc(&self, r#value: GenericUnionTypes::TrustedHTMLOrString::<D>, r#_can_gc: CanGc) -> ErrorResult;
1155    fn Name(&self, ) -> DOMString;
1156    fn SetName(&self, r#value: DOMString);
1157    fn Sandbox(&self, r#_can_gc: CanGc) -> DomRoot<D::DOMTokenList>;
1158    fn AllowFullscreen(&self, ) -> bool;
1159    fn SetAllowFullscreen(&self, r#value: bool);
1160    fn Width(&self, ) -> DOMString;
1161    fn SetWidth(&self, r#value: DOMString);
1162    fn ReferrerPolicy(&self, ) -> DOMString;
1163    fn SetReferrerPolicy(&self, r#value: DOMString);
1164    fn Height(&self, ) -> DOMString;
1165    fn SetHeight(&self, r#value: DOMString);
1166    fn GetContentDocument(&self, ) -> Option<DomRoot<D::Document>>;
1167    fn GetContentWindow(&self, ) -> Option<DomRoot<D::WindowProxy>>;
1168    fn FrameBorder(&self, ) -> DOMString;
1169    fn SetFrameBorder(&self, r#value: DOMString);
1170}
1171static sAttributes_specs: ThreadUnsafeOnceLock<&[&[JSPropertySpec]]> = ThreadUnsafeOnceLock::new();
1172
1173pub(crate) fn init_sAttributes_specs<D: DomTypes>() {
1174    sAttributes_specs.set(Box::leak(Box::new([&Box::leak(Box::new([
1175    JSPropertySpec {
1176                    name: JSPropertySpec_Name { string_: c"src".as_ptr() },
1177                    attributes_: (JSPROP_ENUMERATE),
1178                    kind_: (JSPropertySpec_Kind::NativeAccessor),
1179                    u: JSPropertySpec_AccessorsOrValue {
1180                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
1181                            getter: JSPropertySpec_Accessor {
1182                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { src_getterinfo.get() } },
1183                            },
1184                            setter: JSPropertySpec_Accessor {
1185                                native: JSNativeWrapper { op: Some(generic_setter), info: unsafe { src_setterinfo.get() } },
1186                            }
1187                        }
1188                    }
1189                }
1190,
1191    JSPropertySpec {
1192                    name: JSPropertySpec_Name { string_: c"srcdoc".as_ptr() },
1193                    attributes_: (JSPROP_ENUMERATE),
1194                    kind_: (JSPropertySpec_Kind::NativeAccessor),
1195                    u: JSPropertySpec_AccessorsOrValue {
1196                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
1197                            getter: JSPropertySpec_Accessor {
1198                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { srcdoc_getterinfo.get() } },
1199                            },
1200                            setter: JSPropertySpec_Accessor {
1201                                native: JSNativeWrapper { op: Some(generic_setter), info: unsafe { srcdoc_setterinfo.get() } },
1202                            }
1203                        }
1204                    }
1205                }
1206,
1207    JSPropertySpec {
1208                    name: JSPropertySpec_Name { string_: c"name".as_ptr() },
1209                    attributes_: (JSPROP_ENUMERATE),
1210                    kind_: (JSPropertySpec_Kind::NativeAccessor),
1211                    u: JSPropertySpec_AccessorsOrValue {
1212                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
1213                            getter: JSPropertySpec_Accessor {
1214                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { name_getterinfo.get() } },
1215                            },
1216                            setter: JSPropertySpec_Accessor {
1217                                native: JSNativeWrapper { op: Some(generic_setter), info: unsafe { name_setterinfo.get() } },
1218                            }
1219                        }
1220                    }
1221                }
1222,
1223    JSPropertySpec {
1224                    name: JSPropertySpec_Name { string_: c"sandbox".as_ptr() },
1225                    attributes_: (JSPROP_ENUMERATE),
1226                    kind_: (JSPropertySpec_Kind::NativeAccessor),
1227                    u: JSPropertySpec_AccessorsOrValue {
1228                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
1229                            getter: JSPropertySpec_Accessor {
1230                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { sandbox_getterinfo.get() } },
1231                            },
1232                            setter: JSPropertySpec_Accessor {
1233                                native: JSNativeWrapper { op: Some(generic_setter), info: unsafe { sandbox_setterinfo.get() } },
1234                            }
1235                        }
1236                    }
1237                }
1238,
1239    JSPropertySpec {
1240                    name: JSPropertySpec_Name { string_: c"allowFullscreen".as_ptr() },
1241                    attributes_: (JSPROP_ENUMERATE),
1242                    kind_: (JSPropertySpec_Kind::NativeAccessor),
1243                    u: JSPropertySpec_AccessorsOrValue {
1244                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
1245                            getter: JSPropertySpec_Accessor {
1246                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { allowFullscreen_getterinfo.get() } },
1247                            },
1248                            setter: JSPropertySpec_Accessor {
1249                                native: JSNativeWrapper { op: Some(generic_setter), info: unsafe { allowFullscreen_setterinfo.get() } },
1250                            }
1251                        }
1252                    }
1253                }
1254,
1255    JSPropertySpec {
1256                    name: JSPropertySpec_Name { string_: c"width".as_ptr() },
1257                    attributes_: (JSPROP_ENUMERATE),
1258                    kind_: (JSPropertySpec_Kind::NativeAccessor),
1259                    u: JSPropertySpec_AccessorsOrValue {
1260                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
1261                            getter: JSPropertySpec_Accessor {
1262                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { width_getterinfo.get() } },
1263                            },
1264                            setter: JSPropertySpec_Accessor {
1265                                native: JSNativeWrapper { op: Some(generic_setter), info: unsafe { width_setterinfo.get() } },
1266                            }
1267                        }
1268                    }
1269                }
1270,
1271    JSPropertySpec {
1272                    name: JSPropertySpec_Name { string_: c"referrerPolicy".as_ptr() },
1273                    attributes_: (JSPROP_ENUMERATE),
1274                    kind_: (JSPropertySpec_Kind::NativeAccessor),
1275                    u: JSPropertySpec_AccessorsOrValue {
1276                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
1277                            getter: JSPropertySpec_Accessor {
1278                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { referrerPolicy_getterinfo.get() } },
1279                            },
1280                            setter: JSPropertySpec_Accessor {
1281                                native: JSNativeWrapper { op: Some(generic_setter), info: unsafe { referrerPolicy_setterinfo.get() } },
1282                            }
1283                        }
1284                    }
1285                }
1286,
1287    JSPropertySpec {
1288                    name: JSPropertySpec_Name { string_: c"height".as_ptr() },
1289                    attributes_: (JSPROP_ENUMERATE),
1290                    kind_: (JSPropertySpec_Kind::NativeAccessor),
1291                    u: JSPropertySpec_AccessorsOrValue {
1292                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
1293                            getter: JSPropertySpec_Accessor {
1294                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { height_getterinfo.get() } },
1295                            },
1296                            setter: JSPropertySpec_Accessor {
1297                                native: JSNativeWrapper { op: Some(generic_setter), info: unsafe { height_setterinfo.get() } },
1298                            }
1299                        }
1300                    }
1301                }
1302,
1303    JSPropertySpec {
1304                    name: JSPropertySpec_Name { string_: c"contentDocument".as_ptr() },
1305                    attributes_: (JSPROP_ENUMERATE),
1306                    kind_: (JSPropertySpec_Kind::NativeAccessor),
1307                    u: JSPropertySpec_AccessorsOrValue {
1308                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
1309                            getter: JSPropertySpec_Accessor {
1310                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { contentDocument_getterinfo.get() } },
1311                            },
1312                            setter: JSPropertySpec_Accessor {
1313                                native: JSNativeWrapper { op: None, info: ptr::null() },
1314                            }
1315                        }
1316                    }
1317                }
1318,
1319    JSPropertySpec {
1320                    name: JSPropertySpec_Name { string_: c"contentWindow".as_ptr() },
1321                    attributes_: (JSPROP_ENUMERATE),
1322                    kind_: (JSPropertySpec_Kind::NativeAccessor),
1323                    u: JSPropertySpec_AccessorsOrValue {
1324                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
1325                            getter: JSPropertySpec_Accessor {
1326                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { contentWindow_getterinfo.get() } },
1327                            },
1328                            setter: JSPropertySpec_Accessor {
1329                                native: JSNativeWrapper { op: None, info: ptr::null() },
1330                            }
1331                        }
1332                    }
1333                }
1334,
1335    JSPropertySpec {
1336                    name: JSPropertySpec_Name { string_: c"frameBorder".as_ptr() },
1337                    attributes_: (JSPROP_ENUMERATE),
1338                    kind_: (JSPropertySpec_Kind::NativeAccessor),
1339                    u: JSPropertySpec_AccessorsOrValue {
1340                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
1341                            getter: JSPropertySpec_Accessor {
1342                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { frameBorder_getterinfo.get() } },
1343                            },
1344                            setter: JSPropertySpec_Accessor {
1345                                native: JSNativeWrapper { op: Some(generic_setter), info: unsafe { frameBorder_setterinfo.get() } },
1346                            }
1347                        }
1348                    }
1349                }
1350,
1351    JSPropertySpec::ZERO]))[..]
1352,
1353&Box::leak(Box::new([
1354    JSPropertySpec {
1355                    name: JSPropertySpec_Name { symbol_: SymbolCode::toStringTag as usize + 1 },
1356                    attributes_: (JSPROP_READONLY),
1357                    kind_: (JSPropertySpec_Kind::Value),
1358                    u: JSPropertySpec_AccessorsOrValue {
1359                        value: JSPropertySpec_ValueWrapper {
1360                            type_: JSPropertySpec_ValueWrapper_Type::String,
1361                            __bindgen_anon_1: JSPropertySpec_ValueWrapper__bindgen_ty_1 {
1362                                string: c"HTMLIFrameElement".as_ptr(),
1363                            }
1364                        }
1365                    }
1366                }
1367,
1368    JSPropertySpec::ZERO]))[..]
1369])));
1370}static sAttributes: ThreadUnsafeOnceLock<&[Guard<&[JSPropertySpec]>]> = ThreadUnsafeOnceLock::new();
1371
1372pub(crate) fn init_sAttributes_prefs<D: DomTypes>() {
1373    sAttributes.set(Box::leak(Box::new([    Guard::new(&[Condition::Exposed(Globals::WINDOW)], (unsafe { sAttributes_specs.get() })[0]),
1374    Guard::new(&[Condition::Satisfied], (unsafe { sAttributes_specs.get() })[1])])));
1375}
1376pub fn GetProtoObject<D: DomTypes>
1377(cx: SafeJSContext, global: HandleObject, mut rval: MutableHandleObject){
1378    /* Get the interface prototype object for this class.  This will create the
1379       object as needed. */get_per_interface_object_handle(cx, global, ProtoOrIfaceIndex::ID(PrototypeList::ID::HTMLIFrameElement), CreateInterfaceObjects::<D>, rval)
1380}
1381
1382
1383static PrototypeClass: JSClass = JSClass {
1384    name: c"HTMLIFrameElementPrototype".as_ptr(),
1385    flags:
1386        // JSCLASS_HAS_RESERVED_SLOTS()
1387        (0 ) << JSCLASS_RESERVED_SLOTS_SHIFT,
1388    cOps: ptr::null(),
1389    spec: ptr::null(),
1390    ext: ptr::null(),
1391    oOps: ptr::null(),
1392};
1393
1394unsafe extern "C" fn _constructor<D: DomTypes>
1395(cx: *mut RawJSContext, argc: u32, vp: *mut JSVal) -> bool{
1396    let mut result = false;
1397    wrap_panic(&mut || result = {
1398        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
1399        let args = CallArgs::from_vp(vp, argc);
1400        let global = D::GlobalScope::from_object(JS_CALLEE(cx.raw_cx(), vp).to_object());
1401
1402                        <D as DomHelpers<D>>::call_html_constructor::<D::HTMLIFrameElement>(
1403                            SafeJSContext::from_ptr(cx.raw_cx()),
1404                            &args,
1405                            &global,
1406                            PrototypeList::ID::HTMLIFrameElement,
1407                            CreateInterfaceObjects::<D>,
1408                            CanGc::note()
1409                        )
1410
1411    });
1412    result
1413}
1414
1415
1416static INTERFACE_OBJECT_CLASS: ThreadUnsafeOnceLock<NonCallbackInterfaceObjectClass> = ThreadUnsafeOnceLock::new();
1417
1418pub(crate) fn init_interface_object<D: DomTypes>() {
1419    INTERFACE_OBJECT_CLASS.set(NonCallbackInterfaceObjectClass::new(
1420        Box::leak(Box::new(InterfaceConstructorBehavior::call(_constructor::<D>))),
1421        b"function HTMLIFrameElement() {\n    [native code]\n}",
1422        PrototypeList::ID::HTMLIFrameElement,
1423        4,
1424    ));
1425}
1426
1427pub fn GetConstructorObject<D: DomTypes>
1428(cx: SafeJSContext, global: HandleObject, mut rval: MutableHandleObject){
1429    /* Get the interface object for this class.  This will create the object as
1430       needed. */get_per_interface_object_handle(cx, global, ProtoOrIfaceIndex::Constructor(PrototypeList::Constructor::HTMLIFrameElement), CreateInterfaceObjects::<D>, rval)
1431}
1432
1433pub fn DefineDOMInterface<D: DomTypes>
1434(cx: SafeJSContext, global: HandleObject){
1435    define_dom_interface(cx, global, ProtoOrIfaceIndex::ID(PrototypeList::ID::HTMLIFrameElement),CreateInterfaceObjects::<D>, ConstructorEnabled::<D>)
1436}
1437
1438pub fn ConstructorEnabled<D: DomTypes>
1439(aCx: SafeJSContext, aObj: HandleObject) -> bool{
1440    is_exposed_in(aObj, Globals::WINDOW)
1441}
1442
1443unsafe fn CreateInterfaceObjects<D: DomTypes>
1444(cx: SafeJSContext, global: HandleObject, cache: *mut ProtoOrIfaceArray){
1445
1446    rooted!(&in(cx) let mut prototype_proto = ptr::null_mut::<JSObject>());
1447    HTMLElement_Binding::GetProtoObject::<D>(cx, global, prototype_proto.handle_mut());
1448    assert!(!prototype_proto.is_null());
1449
1450    rooted!(&in(cx) let mut prototype = ptr::null_mut::<JSObject>());
1451    create_interface_prototype_object::<D>(cx,
1452                                      global,
1453                                      prototype_proto.handle(),
1454                                      &PrototypeClass,
1455                                      &[],
1456                                      sAttributes.get(),
1457                                      &[],
1458                                      &[],
1459                                      prototype.handle_mut());
1460    assert!(!prototype.is_null());
1461    assert!((*cache)[PrototypeList::ID::HTMLIFrameElement as usize].is_null());
1462    (*cache)[PrototypeList::ID::HTMLIFrameElement as usize] = prototype.get();
1463    <*mut JSObject>::post_barrier((*cache).as_mut_ptr().offset(PrototypeList::ID::HTMLIFrameElement as isize),
1464                                  ptr::null_mut(),
1465                                  prototype.get());
1466
1467    rooted!(&in(cx) let mut interface_proto = ptr::null_mut::<JSObject>());
1468
1469    HTMLElement_Binding::GetConstructorObject::<D>(cx, global, interface_proto.handle_mut());
1470
1471    assert!(!interface_proto.is_null());
1472
1473    rooted!(&in(cx) let mut interface = ptr::null_mut::<JSObject>());
1474    create_noncallback_interface_object::<D>(cx,
1475                                        global,
1476                                        interface_proto.handle(),
1477                                        INTERFACE_OBJECT_CLASS.get(),
1478                                        &[],
1479                                        &[],
1480                                        &[],
1481                                        prototype.handle(),
1482                                        c"HTMLIFrameElement",
1483                                        0,
1484                                        &[],
1485                                        interface.handle_mut());
1486    assert!(!interface.is_null());
1487
1488    assert!((*cache)[PrototypeList::Constructor::HTMLIFrameElement as usize].is_null());
1489    (*cache)[PrototypeList::Constructor::HTMLIFrameElement as usize] = interface.get();
1490    <*mut JSObject>::post_barrier((*cache).as_mut_ptr().offset(PrototypeList::Constructor::HTMLIFrameElement as isize),
1491                                  ptr::null_mut(),
1492                                  interface.get());
1493
1494}
1495
1496
1497        pub(crate) fn init_statics<D: DomTypes>() {
1498            init_interface_object::<D>();
1499            init_domjs_class::<D>();
1500
1501            init_src_getterinfo::<D>();
1502init_srcdoc_getterinfo::<D>();
1503init_name_getterinfo::<D>();
1504init_sandbox_getterinfo::<D>();
1505init_allowFullscreen_getterinfo::<D>();
1506init_width_getterinfo::<D>();
1507init_referrerPolicy_getterinfo::<D>();
1508init_height_getterinfo::<D>();
1509init_contentDocument_getterinfo::<D>();
1510init_contentWindow_getterinfo::<D>();
1511init_frameBorder_getterinfo::<D>();
1512            init_src_setterinfo::<D>();
1513init_srcdoc_setterinfo::<D>();
1514init_name_setterinfo::<D>();
1515init_sandbox_setterinfo::<D>();
1516init_allowFullscreen_setterinfo::<D>();
1517init_width_setterinfo::<D>();
1518init_referrerPolicy_setterinfo::<D>();
1519init_height_setterinfo::<D>();
1520init_frameBorder_setterinfo::<D>();
1521
1522            init_sAttributes_specs::<D>();
1523init_sAttributes_prefs::<D>();
1524        }
1525        } // mod HTMLIFrameElement_Binding
1526
1527