script/
test.rs

1/* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
5// For compile-fail tests only.
6// pub use crate::dom::bindings::cell::DomRefCell;
7pub use crate::dom::bindings::refcounted::TrustedPromise;
8// pub use crate::dom::bindings::root::Dom;
9pub use crate::dom::bindings::str::{ByteString, DOMString};
10// pub use crate::dom::node::Node;
11
12pub mod area {
13    pub use crate::dom::html::htmlareaelement::{Area, Shape};
14}
15
16#[allow(non_snake_case)]
17pub mod size_of {
18    use std::mem::size_of;
19
20    use crate::dom::characterdata::CharacterData;
21    use crate::dom::element::Element;
22    use crate::dom::eventtarget::EventTarget;
23    use crate::dom::html::htmldivelement::HTMLDivElement;
24    use crate::dom::html::htmlelement::HTMLElement;
25    use crate::dom::html::htmlspanelement::HTMLSpanElement;
26    use crate::dom::node::Node;
27    use crate::dom::text::Text;
28
29    pub fn CharacterData() -> usize {
30        size_of::<CharacterData>()
31    }
32
33    pub fn Element() -> usize {
34        size_of::<Element>()
35    }
36
37    pub fn EventTarget() -> usize {
38        size_of::<EventTarget>()
39    }
40
41    pub fn HTMLDivElement() -> usize {
42        size_of::<HTMLDivElement>()
43    }
44
45    pub fn HTMLElement() -> usize {
46        size_of::<HTMLElement>()
47    }
48
49    pub fn HTMLSpanElement() -> usize {
50        size_of::<HTMLSpanElement>()
51    }
52
53    pub fn Node() -> usize {
54        size_of::<Node>()
55    }
56
57    pub fn Text() -> usize {
58        size_of::<Text>()
59    }
60}
61
62pub mod srcset {
63    pub use crate::dom::html::htmlimageelement::{
64        Descriptor, ImageSource, parse_a_srcset_attribute,
65    };
66}
67
68pub mod timeranges {
69    pub use crate::dom::timeranges::TimeRangesContainer;
70}
71
72pub mod textinput {
73    pub use crate::clipboard_provider::ClipboardProvider;
74    pub use crate::textinput::{
75        Direction, Lines, Selection, SelectionDirection, TextInput, TextPoint, UTF8Bytes,
76        UTF16CodeUnits,
77    };
78}