Struct Document

Source
#[repr(C)]
pub(crate) struct Document {
Show 111 fields node: Node, document_or_shadow_root: DocumentOrShadowRoot, window: Dom<Window>, implementation: MutNullableDom<DOMImplementation>, content_type: Mime, last_modified: Option<String>, encoding: Cell<&'static Encoding>, has_browsing_context: bool, is_html_document: bool, activity: Cell<DocumentActivity>, url: DomRefCell<ServoUrl>, quirks_mode: Cell<QuirksMode>, event_handler: DocumentEventHandler, id_map: DomRefCell<HashMapTracedValues<Atom, Vec<Dom<Element>>>>, name_map: DomRefCell<HashMapTracedValues<Atom, Vec<Dom<Element>>>>, tag_map: DomRefCell<HashMapTracedValues<LocalName, Dom<HTMLCollection>>>, tagns_map: DomRefCell<HashMapTracedValues<QualName, Dom<HTMLCollection>>>, classes_map: DomRefCell<HashMapTracedValues<Vec<Atom>, Dom<HTMLCollection>>>, images: MutNullableDom<HTMLCollection>, embeds: MutNullableDom<HTMLCollection>, links: MutNullableDom<HTMLCollection>, forms: MutNullableDom<HTMLCollection>, scripts: MutNullableDom<HTMLCollection>, anchors: MutNullableDom<HTMLCollection>, applets: MutNullableDom<HTMLCollection>, iframes: RefCell<IFrameCollection>, style_shared_lock: SharedRwLock, stylesheets: DomRefCell<DocumentStylesheetSet<ServoStylesheetInDocument>>, stylesheet_list: MutNullableDom<StyleSheetList>, ready_state: Cell<DocumentReadyState>, domcontentloaded_dispatched: Cell<bool>, focus_transaction: DomRefCell<Option<FocusTransaction>>, focused: MutNullableDom<Element>, focus_sequence: Cell<FocusSequenceNumber>, has_focus: Cell<bool>, current_script: MutNullableDom<HTMLScriptElement>, pending_parsing_blocking_script: DomRefCell<Option<PendingScript>>, script_blocking_stylesheets_count: Cell<u32>, deferred_scripts: PendingInOrderScriptVec, asap_in_order_scripts_list: PendingInOrderScriptVec, asap_scripts_set: DomRefCell<Vec<Dom<HTMLScriptElement>>>, scripting_enabled: bool, animation_frame_ident: Cell<u32>, animation_frame_list: DomRefCell<VecDeque<(u32, Option<AnimationFrameCallback>)>>, running_animation_callbacks: Cell<bool>, loader: DomRefCell<DocumentLoader>, current_parser: MutNullableDom<ServoParser>, base_element: MutNullableDom<HTMLBaseElement>, appropriate_template_contents_owner_document: MutNullableDom<Document>, pending_restyles: DomRefCell<FnvHashMap<Dom<Element>, NoTrace<PendingRestyle>>>, needs_restyle: Cell<RestyleReason>, dom_interactive: Cell<Option<CrossProcessInstant>>, dom_content_loaded_event_start: Cell<Option<CrossProcessInstant>>, dom_content_loaded_event_end: Cell<Option<CrossProcessInstant>>, dom_complete: Cell<Option<CrossProcessInstant>>, top_level_dom_complete: Cell<Option<CrossProcessInstant>>, load_event_start: Cell<Option<CrossProcessInstant>>, load_event_end: Cell<Option<CrossProcessInstant>>, unload_event_start: Cell<Option<CrossProcessInstant>>, unload_event_end: Cell<Option<CrossProcessInstant>>, https_state: Cell<HttpsState>, origin: MutableOrigin, referrer: Option<String>, target_element: MutNullableDom<Element>, policy_container: DomRefCell<PolicyContainer>, ignore_destructive_writes_counter: Cell<u32>, ignore_opens_during_unload_counter: Cell<u32>, spurious_animation_frames: Cell<u8>, dom_count: Cell<u32>, fullscreen_element: MutNullableDom<Element>, form_id_listener_map: DomRefCell<HashMapTracedValues<Atom, HashSet<Dom<Element>>>>, interactive_time: DomRefCell<ProgressiveWebMetrics>, tti_window: DomRefCell<InteractiveWindow>, canceller: FetchCanceller, throw_on_dynamic_markup_insertion_counter: Cell<u64>, page_showing: Cell<bool>, salvageable: Cell<bool>, active_parser_was_aborted: Cell<bool>, fired_unload: Cell<bool>, responsive_images: DomRefCell<Vec<Dom<HTMLImageElement>>>, redirect_count: Cell<u16>, script_and_layout_blockers: Cell<u32>, delayed_tasks: DomRefCell<Vec<Box<dyn NonSendTaskBox>>>, completely_loaded: Cell<bool>, shadow_roots: DomRefCell<HashSet<Dom<ShadowRoot>>>, shadow_roots_styles_changed: Cell<bool>, media_controls: DomRefCell<HashMap<String, Dom<ShadowRoot>>>, dirty_2d_contexts: DomRefCell<HashMapTracedValues<CanvasId, Dom<CanvasRenderingContext2D>>>, dirty_webgl_contexts: DomRefCell<HashMapTracedValues<WebGLContextId, Dom<WebGLRenderingContext>>>, webgpu_contexts: Rc<RefCell<HashMapTracedValues<WebGPUContextId, WeakRef<GPUCanvasContext>>>>, selection: MutNullableDom<Selection>, animation_timeline: DomRefCell<AnimationTimeline>, animations: DomRefCell<Animations>, image_animation_manager: DomRefCell<ImageAnimationManager>, dirty_root: MutNullableDom<Element>, declarative_refresh: DomRefCell<Option<DeclarativeRefresh>>, resize_observers: DomRefCell<Vec<Dom<ResizeObserver>>>, fonts: MutNullableDom<FontFaceSet>, visibility_state: Cell<DocumentVisibilityState>, status_code: Option<u16>, is_initial_about_blank: Cell<bool>, allow_declarative_shadow_roots: Cell<bool>, inherited_insecure_requests_policy: Cell<Option<InsecureRequestsPolicy>>, has_trustworthy_ancestor_origin: Cell<bool>, intersection_observer_task_queued: Cell<bool>, intersection_observers: DomRefCell<Vec<Dom<IntersectionObserver>>>, highlighted_dom_node: MutNullableDom<Node>, adopted_stylesheets: DomRefCell<Vec<Dom<CSSStyleSheet>>>, adopted_stylesheets_frozen_types: CachedFrozenArray, pending_scroll_event_targets: DomRefCell<Vec<Dom<EventTarget>>>, resize_observer_started_observing_target: Cell<bool>,
}
Expand description

Fields§

§node: Node§document_or_shadow_root: DocumentOrShadowRoot§window: Dom<Window>§implementation: MutNullableDom<DOMImplementation>§content_type: Mime§last_modified: Option<String>§encoding: Cell<&'static Encoding>§has_browsing_context: bool§is_html_document: bool§activity: Cell<DocumentActivity>§url: DomRefCell<ServoUrl>§quirks_mode: Cell<QuirksMode>§event_handler: DocumentEventHandler

A helper used to process and store data related to input event handling.

§id_map: DomRefCell<HashMapTracedValues<Atom, Vec<Dom<Element>>>>

Caches for the getElement methods

§name_map: DomRefCell<HashMapTracedValues<Atom, Vec<Dom<Element>>>>§tag_map: DomRefCell<HashMapTracedValues<LocalName, Dom<HTMLCollection>>>§tagns_map: DomRefCell<HashMapTracedValues<QualName, Dom<HTMLCollection>>>§classes_map: DomRefCell<HashMapTracedValues<Vec<Atom>, Dom<HTMLCollection>>>§images: MutNullableDom<HTMLCollection>§embeds: MutNullableDom<HTMLCollection>§links: MutNullableDom<HTMLCollection>§forms: MutNullableDom<HTMLCollection>§scripts: MutNullableDom<HTMLCollection>§anchors: MutNullableDom<HTMLCollection>§applets: MutNullableDom<HTMLCollection>§iframes: RefCell<IFrameCollection>

Information about the <iframes> in this Document.

§style_shared_lock: SharedRwLock

Lock use for style attributes and author-origin stylesheet objects in this document. Can be acquired once for accessing many objects.

§stylesheets: DomRefCell<DocumentStylesheetSet<ServoStylesheetInDocument>>

List of stylesheets associated with nodes in this document. |None| if the list needs to be refreshed.

§stylesheet_list: MutNullableDom<StyleSheetList>§ready_state: Cell<DocumentReadyState>§domcontentloaded_dispatched: Cell<bool>

Whether the DOMContentLoaded event has already been dispatched.

§focus_transaction: DomRefCell<Option<FocusTransaction>>

The state of this document’s focus transaction.

§focused: MutNullableDom<Element>

The element that currently has the document focus context.

§focus_sequence: Cell<FocusSequenceNumber>

The last sequence number sent to the constellation.

§has_focus: Cell<bool>

Indicates whether the container is included in the top-level browsing context’s focus chain (not considering system focus). Permanently true for a top-level document.

§current_script: MutNullableDom<HTMLScriptElement>

The script element that is currently executing.

§pending_parsing_blocking_script: DomRefCell<Option<PendingScript>>§script_blocking_stylesheets_count: Cell<u32>

Number of stylesheets that block executing the next parser-inserted script

§deferred_scripts: PendingInOrderScriptVec§asap_in_order_scripts_list: PendingInOrderScriptVec§asap_scripts_set: DomRefCell<Vec<Dom<HTMLScriptElement>>>§scripting_enabled: bool

https://html.spec.whatwg.org/multipage/#concept-n-noscript True if scripting is enabled for all scripts in this document

§animation_frame_ident: Cell<u32>§animation_frame_list: DomRefCell<VecDeque<(u32, Option<AnimationFrameCallback>)>>§running_animation_callbacks: Cell<bool>

Whether we’re in the process of running animation callbacks.

Tracking this is not necessary for correctness. Instead, it is an optimization to avoid sending needless ChangeRunningAnimationsState messages to the compositor.

§loader: DomRefCell<DocumentLoader>

Tracks all outstanding loads related to this document.

§current_parser: MutNullableDom<ServoParser>

The current active HTML parser, to allow resuming after interruptions.

§base_element: MutNullableDom<HTMLBaseElement>

The cached first base element with an href attribute.

§appropriate_template_contents_owner_document: MutNullableDom<Document>§pending_restyles: DomRefCell<FnvHashMap<Dom<Element>, NoTrace<PendingRestyle>>>

Information on elements needing restyle to ship over to layout when the time comes.

§needs_restyle: Cell<RestyleReason>

A collection of reasons that the Document needs to be restyled at the next opportunity for a reflow. If this is empty, then the Document does not need to be restyled.

§dom_interactive: Cell<Option<CrossProcessInstant>>§dom_content_loaded_event_start: Cell<Option<CrossProcessInstant>>§dom_content_loaded_event_end: Cell<Option<CrossProcessInstant>>§dom_complete: Cell<Option<CrossProcessInstant>>§top_level_dom_complete: Cell<Option<CrossProcessInstant>>§load_event_start: Cell<Option<CrossProcessInstant>>§load_event_end: Cell<Option<CrossProcessInstant>>§unload_event_start: Cell<Option<CrossProcessInstant>>§unload_event_end: Cell<Option<CrossProcessInstant>>§https_state: Cell<HttpsState>§origin: MutableOrigin

The document’s origin.

§referrer: Option<String>§target_element: MutNullableDom<Element>§policy_container: DomRefCell<PolicyContainer>§ignore_destructive_writes_counter: Cell<u32>§ignore_opens_during_unload_counter: Cell<u32>§spurious_animation_frames: Cell<u8>

The number of spurious requestAnimationFrame() requests we’ve received.

A rAF request is considered spurious if nothing was actually reflowed.

§dom_count: Cell<u32>

Track the total number of elements in this DOM’s tree. This is sent to layout every time a reflow is done; layout uses this to determine if the gains from parallel layout will be worth the overhead.

See also: https://github.com/servo/servo/issues/10110

§fullscreen_element: MutNullableDom<Element>

Entry node for fullscreen.

§form_id_listener_map: DomRefCell<HashMapTracedValues<Atom, HashSet<Dom<Element>>>>

Map from ID to set of form control elements that have that ID as their ‘form’ content attribute. Used to reset form controls whenever any element with the same ID as the form attribute is inserted or removed from the document. See https://html.spec.whatwg.org/multipage/#form-owner

§interactive_time: DomRefCell<ProgressiveWebMetrics>§tti_window: DomRefCell<InteractiveWindow>§canceller: FetchCanceller

RAII canceller for Fetch

§throw_on_dynamic_markup_insertion_counter: Cell<u64>§page_showing: Cell<bool>§salvageable: Cell<bool>

Whether the document is salvageable.

§active_parser_was_aborted: Cell<bool>

Whether the document was aborted with an active parser

§fired_unload: Cell<bool>

Whether the unload event has already been fired.

§responsive_images: DomRefCell<Vec<Dom<HTMLImageElement>>>

List of responsive images

§redirect_count: Cell<u16>

Number of redirects for the document load

§script_and_layout_blockers: Cell<u32>

Number of outstanding requests to prevent JS or layout from running.

§delayed_tasks: DomRefCell<Vec<Box<dyn NonSendTaskBox>>>

List of tasks to execute as soon as last script/layout blocker is removed.

§completely_loaded: Cell<bool>§shadow_roots: DomRefCell<HashSet<Dom<ShadowRoot>>>

Set of shadow roots connected to the document tree.

§shadow_roots_styles_changed: Cell<bool>

Whether any of the shadow roots need the stylesheets flushed.

§media_controls: DomRefCell<HashMap<String, Dom<ShadowRoot>>>

List of registered media controls. We need to keep this list to allow the media controls to access the “privileged” document.servoGetMediaControls(id) API, where id needs to match any of the registered ShadowRoots hosting the media controls UI.

§dirty_2d_contexts: DomRefCell<HashMapTracedValues<CanvasId, Dom<CanvasRenderingContext2D>>>

List of all context 2d IDs that need flushing.

§dirty_webgl_contexts: DomRefCell<HashMapTracedValues<WebGLContextId, Dom<WebGLRenderingContext>>>

List of all WebGL context IDs that need flushing.

§webgpu_contexts: Rc<RefCell<HashMapTracedValues<WebGPUContextId, WeakRef<GPUCanvasContext>>>>

List of all WebGPU contexts.

§selection: MutNullableDom<Selection>§animation_timeline: DomRefCell<AnimationTimeline>

A timeline for animations which is used for synchronizing animations. https://drafts.csswg.org/web-animations/#timeline

§animations: DomRefCell<Animations>

Animations for this Document

§image_animation_manager: DomRefCell<ImageAnimationManager>

Image Animation Manager for this Document

§dirty_root: MutNullableDom<Element>

The nearest inclusive ancestors to all the nodes that require a restyle.

§declarative_refresh: DomRefCell<Option<DeclarativeRefresh>>§resize_observers: DomRefCell<Vec<Dom<ResizeObserver>>>§fonts: MutNullableDom<FontFaceSet>§visibility_state: Cell<DocumentVisibilityState>§status_code: Option<u16>§is_initial_about_blank: Cell<bool>§allow_declarative_shadow_roots: Cell<bool>§inherited_insecure_requests_policy: Cell<Option<InsecureRequestsPolicy>>§has_trustworthy_ancestor_origin: Cell<bool>§intersection_observer_task_queued: Cell<bool>§intersection_observers: DomRefCell<Vec<Dom<IntersectionObserver>>>

Active intersection observers that should be processed by this document in the update intersection observation steps. https://w3c.github.io/IntersectionObserver/#run-the-update-intersection-observations-steps

Let observer list be a list of all IntersectionObservers whose root is in the DOM tree of document. For the top-level browsing context, this includes implicit root observers.

Details of which document that should process an observers is discussed further at https://github.com/w3c/IntersectionObserver/issues/525.

The lifetime of an intersection observer is specified at https://github.com/w3c/IntersectionObserver/issues/525.

§highlighted_dom_node: MutNullableDom<Node>

The node that is currently highlighted by the devtools

§adopted_stylesheets: DomRefCell<Vec<Dom<CSSStyleSheet>>>§adopted_stylesheets_frozen_types: CachedFrozenArray

Cached frozen array of Self::adopted_stylesheets

§pending_scroll_event_targets: DomRefCell<Vec<Dom<EventTarget>>>§resize_observer_started_observing_target: Cell<bool>

When a ResizeObserver starts observing a target, this becomes true, which in turn is a signal to the ScriptThread that a rendering update should happen.

Implementations§

Source§

impl Document

Source§

impl Document

Source

pub(crate) fn note_node_with_dirty_descendants(&self, node: &Node)

Source

pub(crate) fn take_dirty_root(&self) -> Option<DomRoot<Element>>

Source

pub(crate) fn loader(&self) -> Ref<'_, DocumentLoader>

Source

pub(crate) fn loader_mut(&self) -> RefMut<'_, DocumentLoader>

Source

pub(crate) fn has_browsing_context(&self) -> bool

Source

pub(crate) fn browsing_context(&self) -> Option<DomRoot<WindowProxy>>

Source

pub(crate) fn webview_id(&self) -> WebViewId

Source

pub(crate) fn window(&self) -> &Window

Source

pub(crate) fn is_html_document(&self) -> bool

Source

pub(crate) fn is_xhtml_document(&self) -> bool

Source

pub(crate) fn set_https_state(&self, https_state: HttpsState)

Source

pub(crate) fn is_fully_active(&self) -> bool

Source

pub(crate) fn is_active(&self) -> bool

Source

pub(crate) fn set_activity(&self, activity: DocumentActivity, can_gc: CanGc)

Source

pub(crate) fn origin(&self) -> &MutableOrigin

Source

pub(crate) fn url(&self) -> ServoUrl

Source

pub(crate) fn set_url(&self, url: ServoUrl)

Source

pub(crate) fn fallback_base_url(&self) -> ServoUrl

Source

pub(crate) fn base_url(&self) -> ServoUrl

Source

pub(crate) fn add_restyle_reason(&self, reason: RestyleReason)

Source

pub(crate) fn clear_restyle_reasons(&self)

Source

pub(crate) fn restyle_reason(&self) -> RestyleReason

Source

pub(crate) fn base_element(&self) -> Option<DomRoot<HTMLBaseElement>>

Returns the first base element in the DOM that has an href attribute.

Source

pub(crate) fn refresh_base_element(&self)

Refresh the cached first base element in the DOM. https://github.com/w3c/web-platform-tests/issues/2122

Source

pub(crate) fn dom_count(&self) -> u32

Source

pub(crate) fn increment_dom_count(&self)

This is called by bind_to_tree when a node is added to the DOM. The internal count is used by layout to determine whether to be sequential or parallel. (it’s sequential for small DOMs)

Source

pub(crate) fn decrement_dom_count(&self)

This is called by unbind_from_tree when a node is removed from the DOM.

Source

pub(crate) fn quirks_mode(&self) -> QuirksMode

Source

pub(crate) fn set_quirks_mode(&self, new_mode: QuirksMode)

Source

pub(crate) fn encoding(&self) -> &'static Encoding

Source

pub(crate) fn set_encoding(&self, encoding: &'static Encoding)

Source

pub(crate) fn content_and_heritage_changed(&self, node: &Node)

Source

pub(crate) fn unregister_element_id( &self, to_unregister: &Element, id: Atom, can_gc: CanGc, )

Remove any existing association between the provided id and any elements in this document.

Source

pub(crate) fn register_element_id( &self, element: &Element, id: Atom, can_gc: CanGc, )

Associate an element present in this document with the provided id.

Source

pub(crate) fn unregister_element_name( &self, to_unregister: &Element, name: Atom, )

Remove any existing association between the provided name and any elements in this document.

Source

pub(crate) fn register_element_name(&self, element: &Element, name: Atom)

Associate an element present in this document with the provided name.

Source

pub(crate) fn register_form_id_listener<T: ?Sized + FormControl>( &self, id: DOMString, listener: &T, )

Source

pub(crate) fn unregister_form_id_listener<T: ?Sized + FormControl>( &self, id: DOMString, listener: &T, )

Source

pub(crate) fn find_fragment_node( &self, fragid: &str, ) -> Option<DomRoot<Element>>

Source

pub(crate) fn check_and_scroll_fragment(&self, fragment: &str)

Scroll to the target element, and when we do not find a target and the fragment is empty or “top”, scroll to the top. https://html.spec.whatwg.org/multipage/#scroll-to-the-fragment-identifier

Source

fn get_anchor_by_name(&self, name: &str) -> Option<DomRoot<Element>>

Source

pub(crate) fn set_ready_state(&self, state: DocumentReadyState, can_gc: CanGc)

Source

pub(crate) fn is_scripting_enabled(&self) -> bool

Return whether scripting is enabled or not

Source

pub(crate) fn scripting_enabled(&self) -> bool

Source

pub(crate) fn get_focused_element(&self) -> Option<DomRoot<Element>>

Return the element that currently has focus.

Source

pub fn get_focus_sequence(&self) -> FocusSequenceNumber

Get the last sequence number sent to the constellation.

Received focus-related messages with sequence numbers less than the one returned by this method must be discarded.

Source

fn increment_fetch_focus_sequence(&self) -> FocusSequenceNumber

Generate the next sequence number for focus-related messages.

Source

pub(crate) fn has_focus_transaction(&self) -> bool

Source

pub(crate) fn begin_focus_transaction(&self)

Initiate a new round of checking for elements requesting focus. The last element to call request_focus before commit_focus_transaction is called will receive focus.

Source

pub(crate) fn perform_focus_fixup_rule( &self, not_focusable: &Element, can_gc: CanGc, )

Source

pub(crate) fn request_focus( &self, elem: Option<&Element>, focus_initiator: FocusInitiator, can_gc: CanGc, )

Request that the given element receive focus with default options. See Self::request_focus_with_options for the details.

Source

pub(crate) fn request_focus_with_options( &self, elem: Option<&Element>, focus_initiator: FocusInitiator, focus_options: FocusOptions, can_gc: CanGc, )

Request that the given element receive focus once the current transaction is complete. None specifies to focus the document.

If there’s no ongoing transaction, this method automatically starts and commits an implicit transaction.

Source

pub(crate) fn handle_container_unfocus(&self, can_gc: CanGc)

Update the local focus state accordingly after being notified that the document’s container is removed from the top-level browsing context’s focus chain (not considering system focus).

Source

pub(crate) fn commit_focus_transaction( &self, focus_initiator: FocusInitiator, can_gc: CanGc, )

Reassign the focus context to the element that last requested focus during this transaction, or the document if no elements requested it.

Source

pub(crate) fn title_changed(&self)

Handles any updates when the document’s title has changed.

Source

fn title(&self) -> Option<DOMString>

Determine the title of the Document according to the specification at: https://html.spec.whatwg.org/multipage/#document.title. The difference here is that when the title isn’t specified None is returned.

Source

pub(crate) fn send_title_to_embedder(&self)

Sends this document’s title to the constellation.

Source

pub(crate) fn send_to_embedder(&self, msg: EmbedderMsg)

Source

pub(crate) fn dirty_all_nodes(&self)

Source

pub(crate) fn run_the_scroll_steps(&self, can_gc: CanGc)

Source

pub(crate) fn handle_viewport_scroll_event(&self)

Whenever a viewport gets scrolled (whether in response to user interaction or by an API), the user agent must run these steps: https://drafts.csswg.org/cssom-view/#scrolling-events

Source

pub(crate) fn handle_element_scroll_event(&self, element: &Element)

Whenever an element gets scrolled (whether in response to user interaction or by an API), the user agent must run these steps: https://drafts.csswg.org/cssom-view/#scrolling-events

Source

pub(crate) fn node_from_nodes_and_strings( &self, nodes: Vec<NodeOrString<DomTypeHolder>>, can_gc: CanGc, ) -> Fallible<DomRoot<Node>>

Source

pub(crate) fn get_body_attribute(&self, local_name: &LocalName) -> DOMString

Source

pub(crate) fn set_body_attribute( &self, local_name: &LocalName, value: DOMString, can_gc: CanGc, )

Source

pub(crate) fn set_current_script(&self, script: Option<&HTMLScriptElement>)

Source

pub(crate) fn get_script_blocking_stylesheets_count(&self) -> u32

Source

pub(crate) fn increment_script_blocking_stylesheet_count(&self)

Source

pub(crate) fn decrement_script_blocking_stylesheet_count(&self)

Source

pub(crate) fn invalidate_stylesheets(&self)

Source

pub(crate) fn has_active_request_animation_frame_callbacks(&self) -> bool

Whether or not this Document has any active requestAnimationFrame callbacks registered.

Source

pub(crate) fn request_animation_frame( &self, callback: AnimationFrameCallback, ) -> u32

Source

pub(crate) fn cancel_animation_frame(&self, ident: u32)

Source

pub(crate) fn run_the_animation_frame_callbacks(&self, can_gc: CanGc)

Source

pub(crate) fn policy_container(&self) -> Ref<'_, PolicyContainer>

Source

pub(crate) fn prepare_request(&self, request: RequestBuilder) -> RequestBuilder

Add the policy container and HTTPS state to a given request.

TODO: Can this hapen for all requests that go through the document?

Source

pub(crate) fn fetch<Listener: FetchResponseListener + PreInvoke + Send + 'static>( &self, load: LoadType, request: RequestBuilder, listener: Listener, )

Source

pub(crate) fn fetch_background<Listener: FetchResponseListener + PreInvoke + Send + 'static>( &self, request: RequestBuilder, listener: Listener, )

Source

pub(crate) fn finish_load(&self, load: LoadType, can_gc: CanGc)

Source

pub(crate) fn prompt_to_unload( &self, recursive_flag: bool, can_gc: CanGc, ) -> bool

Source

pub(crate) fn unload(&self, recursive_flag: bool, can_gc: CanGc)

Source

pub(crate) fn maybe_queue_document_completion(&self)

Source

pub(crate) fn completely_loaded(&self) -> bool

Source

pub(crate) fn set_pending_parsing_blocking_script( &self, script: &HTMLScriptElement, load: Option<Result<ScriptOrigin, NoTrace<NetworkError>>>, )

Source

pub(crate) fn has_pending_parsing_blocking_script(&self) -> bool

Source

pub(crate) fn pending_parsing_blocking_script_loaded( &self, element: &HTMLScriptElement, result: Result<ScriptOrigin, NoTrace<NetworkError>>, can_gc: CanGc, )

Source

fn process_pending_parsing_blocking_script(&self, can_gc: CanGc)

Source

pub(crate) fn add_asap_script(&self, script: &HTMLScriptElement)

Source

pub(crate) fn asap_script_loaded( &self, element: &HTMLScriptElement, result: Result<ScriptOrigin, NoTrace<NetworkError>>, can_gc: CanGc, )

Source

pub(crate) fn push_asap_in_order_script(&self, script: &HTMLScriptElement)

Source

pub(crate) fn asap_in_order_script_loaded( &self, element: &HTMLScriptElement, result: Result<ScriptOrigin, NoTrace<NetworkError>>, can_gc: CanGc, )

Source

pub(crate) fn add_deferred_script(&self, script: &HTMLScriptElement)

Source

pub(crate) fn deferred_script_loaded( &self, element: &HTMLScriptElement, result: Result<ScriptOrigin, NoTrace<NetworkError>>, can_gc: CanGc, )

Source

fn process_deferred_scripts(&self, can_gc: CanGc)

Source

pub(crate) fn maybe_dispatch_dom_content_loaded(&self)

Source

pub(crate) fn abort(&self, can_gc: CanGc)

Source

pub(crate) fn notify_constellation_load(&self)

Source

pub(crate) fn set_current_parser(&self, script: Option<&ServoParser>)

Source

pub(crate) fn get_current_parser(&self) -> Option<DomRoot<ServoParser>>

Source

pub(crate) fn iframes(&self) -> Ref<'_, IFrameCollection>

A reference to the IFrameCollection of this Document, holding information about <iframe>s found within it.

Source

pub(crate) fn iframes_mut(&self) -> RefMut<'_, IFrameCollection>

A mutable reference to the IFrameCollection of this Document, holding information about <iframe>s found within it.

Source

pub(crate) fn invalidate_iframes_collection(&self)

Source

pub(crate) fn get_dom_interactive(&self) -> Option<CrossProcessInstant>

Source

pub(crate) fn set_navigation_start(&self, navigation_start: CrossProcessInstant)

Source

pub(crate) fn get_interactive_metrics(&self) -> Ref<'_, ProgressiveWebMetrics>

Source

pub(crate) fn has_recorded_tti_metric(&self) -> bool

Source

pub(crate) fn get_dom_content_loaded_event_start( &self, ) -> Option<CrossProcessInstant>

Source

pub(crate) fn get_dom_content_loaded_event_end( &self, ) -> Option<CrossProcessInstant>

Source

pub(crate) fn get_dom_complete(&self) -> Option<CrossProcessInstant>

Source

pub(crate) fn get_top_level_dom_complete(&self) -> Option<CrossProcessInstant>

Source

pub(crate) fn get_load_event_start(&self) -> Option<CrossProcessInstant>

Source

pub(crate) fn get_load_event_end(&self) -> Option<CrossProcessInstant>

Source

pub(crate) fn get_unload_event_start(&self) -> Option<CrossProcessInstant>

Source

pub(crate) fn get_unload_event_end(&self) -> Option<CrossProcessInstant>

Source

pub(crate) fn start_tti(&self)

Source

pub(crate) fn record_tti_if_necessary(&self)

check tti for this document if it’s been 10s since this doc encountered a task over 50ms, then we consider the main thread available and try to set tti

Source

fn fire_focus_event( &self, focus_event_type: FocusEventType, event_target: &EventTarget, related_target: Option<&EventTarget>, can_gc: CanGc, )

Source

pub(crate) fn lookup_custom_element_definition( &self, namespace: &Namespace, local_name: &LocalName, is: Option<&LocalName>, ) -> Option<Rc<CustomElementDefinition>>

Source

pub(crate) fn increment_throw_on_dynamic_markup_insertion_counter(&self)

Source

pub(crate) fn decrement_throw_on_dynamic_markup_insertion_counter(&self)

Source

pub(crate) fn react_to_environment_changes(&self)

Source

pub(crate) fn register_responsive_image(&self, img: &HTMLImageElement)

Source

pub(crate) fn unregister_responsive_image(&self, img: &HTMLImageElement)

Source

pub(crate) fn register_media_controls(&self, controls: &ShadowRoot) -> String

Source

pub(crate) fn unregister_media_controls(&self, id: &str, can_gc: CanGc)

Source

pub(crate) fn add_dirty_webgl_canvas(&self, context: &WebGLRenderingContext)

Source

pub(crate) fn add_dirty_2d_canvas(&self, context: &CanvasRenderingContext2D)

Source

pub(crate) fn webgpu_contexts( &self, ) -> Rc<RefCell<HashMapTracedValues<WebGPUContextId, WeakRef<GPUCanvasContext>>>>

Source

pub(crate) fn needs_rendering_update(&self) -> bool

Whether or not this Document needs a rendering update, due to changed contents or pending events. This is used to decide whether or not to schedule a call to the “update the rendering” algorithm.

Source

pub(crate) fn update_the_rendering(&self) -> ReflowPhasesRun

Source

pub(crate) fn maybe_fulfill_font_ready_promise(&self, can_gc: CanGc) -> bool

From https://drafts.csswg.org/css-font-loading/#fontfaceset-pending-on-the-environment:

A FontFaceSet is pending on the environment if any of the following are true:

  • the document is still loading
  • the document has pending stylesheet requests
  • the document has pending layout operations which might cause the user agent to request a font, or which depend on recently-loaded fonts

Returns true if the promise was fulfilled.

Source

pub(crate) fn id_map( &self, ) -> Ref<'_, HashMapTracedValues<Atom, Vec<Dom<Element>>>>

Source

pub(crate) fn name_map( &self, ) -> Ref<'_, HashMapTracedValues<Atom, Vec<Dom<Element>>>>

Source

pub(crate) fn add_resize_observer(&self, resize_observer: &ResizeObserver)

Source

pub(crate) fn has_resize_observers(&self) -> bool

Whether or not this Document has any active ResizeObserver.

Source

pub(crate) fn gather_active_resize_observations_at_depth( &self, depth: &ResizeObservationDepth, ) -> bool

Source

pub(crate) fn broadcast_active_resize_observations( &self, can_gc: CanGc, ) -> ResizeObservationDepth

Source

pub(crate) fn has_skipped_resize_observations(&self) -> bool

Source

pub(crate) fn deliver_resize_loop_error_notification(&self, can_gc: CanGc)

Source

pub(crate) fn status_code(&self) -> Option<u16>

Source

pub(crate) fn encoding_parse_a_url( &self, url: &str, ) -> Result<ServoUrl, ParseError>

Source

pub(crate) fn allowed_to_use_feature(&self, _feature: PermissionName) -> bool

Source

pub(crate) fn add_intersection_observer( &self, intersection_observer: &IntersectionObserver, )

Source

pub(crate) fn remove_intersection_observer( &self, intersection_observer: &IntersectionObserver, )

Remove an IntersectionObserver from Document, ommiting it from the event loop. An observer without any target, ideally should be removed to be conformant with https://w3c.github.io/IntersectionObserver/#lifetime.

Source

pub(crate) fn update_intersection_observer_steps( &self, time: CrossProcessInstant, can_gc: CanGc, )

Source

fn update_single_intersection_observer_steps( &self, intersection_observer: &IntersectionObserver, time: CrossProcessInstant, can_gc: CanGc, )

Source

pub(crate) fn notify_intersection_observers(&self, can_gc: CanGc)

Source

pub(crate) fn queue_an_intersection_observer_task(&self)

Source

pub(crate) fn handle_paint_metric( &self, metric_type: ProgressiveWebMetricType, metric_value: CrossProcessInstant, first_reflow: bool, can_gc: CanGc, )

Source

fn write( &self, text: Vec<TrustedHTMLOrString<DomTypeHolder>>, line_feed: bool, containing_class: &str, field: &str, can_gc: CanGc, ) -> ErrorResult

Source§

impl Document

Source

pub(crate) fn new_inherited( window: &Window, has_browsing_context: HasBrowsingContext, url: Option<ServoUrl>, origin: MutableOrigin, is_html_document: IsHTMLDocument, content_type: Option<Mime>, last_modified: Option<String>, activity: DocumentActivity, source: DocumentSource, doc_loader: DocumentLoader, referrer: Option<String>, status_code: Option<u16>, canceller: FetchCanceller, is_initial_about_blank: bool, allow_declarative_shadow_roots: bool, inherited_insecure_requests_policy: Option<InsecureRequestsPolicy>, has_trustworthy_ancestor_origin: bool, ) -> Document

Source

pub(crate) fn insecure_requests_policy(&self) -> InsecureRequestsPolicy

Returns a policy value that should be used for fetches initiated by this document.

Source

pub(crate) fn event_handler(&self) -> &DocumentEventHandler

Source

fn has_pending_scroll_events(&self) -> bool

Whether or not this Document has any pending scroll events to be processed during “update the rendering.”

Source

pub(crate) fn set_resize_observer_started_observing_target(&self, value: bool)

Source

pub(crate) fn set_csp_list(&self, csp_list: Option<CspList>)

Source

pub(crate) fn get_csp_list(&self) -> Option<CspList>

Source

pub(crate) fn add_script_and_layout_blocker(&self)

Prevent any JS or layout from running until the corresponding call to remove_script_and_layout_blocker. Used to isolate periods in which the DOM is in an unstable state and should not be exposed to arbitrary web content. Any attempts to invoke content JS or query layout during that time will trigger a panic. add_delayed_task will cause the provided task to be executed as soon as the last blocker is removed.

Source

pub(crate) fn remove_script_and_layout_blocker(&self)

Terminate the period in which JS or layout is disallowed from running. If no further blockers remain, any delayed tasks in the queue will be executed in queue order until the queue is empty.

Source

pub(crate) fn add_delayed_task<T: 'static + NonSendTaskBox>(&self, task: T)

Enqueue a task to run as soon as any JS and layout blockers are removed.

Source

pub(crate) fn ensure_safe_to_run_script_or_layout(&self)

Assert that the DOM is in a state that will allow running content JS or performing a layout operation.

Source

pub(crate) fn new( window: &Window, has_browsing_context: HasBrowsingContext, url: Option<ServoUrl>, origin: MutableOrigin, doctype: IsHTMLDocument, content_type: Option<Mime>, last_modified: Option<String>, activity: DocumentActivity, source: DocumentSource, doc_loader: DocumentLoader, referrer: Option<String>, status_code: Option<u16>, canceller: FetchCanceller, is_initial_about_blank: bool, allow_declarative_shadow_roots: bool, inherited_insecure_requests_policy: Option<InsecureRequestsPolicy>, has_trustworthy_ancestor_origin: bool, can_gc: CanGc, ) -> DomRoot<Document>

Source

fn new_with_proto( window: &Window, proto: Option<HandleObject<'_>>, has_browsing_context: HasBrowsingContext, url: Option<ServoUrl>, origin: MutableOrigin, doctype: IsHTMLDocument, content_type: Option<Mime>, last_modified: Option<String>, activity: DocumentActivity, source: DocumentSource, doc_loader: DocumentLoader, referrer: Option<String>, status_code: Option<u16>, canceller: FetchCanceller, is_initial_about_blank: bool, allow_declarative_shadow_roots: bool, inherited_insecure_requests_policy: Option<InsecureRequestsPolicy>, has_trustworthy_ancestor_origin: bool, can_gc: CanGc, ) -> DomRoot<Document>

Source

pub(crate) fn get_redirect_count(&self) -> u16

Source

pub(crate) fn set_redirect_count(&self, count: u16)

Source

pub(crate) fn elements_by_name_count(&self, name: &DOMString) -> u32

Source

pub(crate) fn nth_element_by_name( &self, index: u32, name: &DOMString, ) -> Option<DomRoot<Node>>

Source

fn is_element_in_get_by_name(node: &Node, name: &DOMString) -> bool

Source

fn count_node_list<F: Fn(&Node) -> bool>(&self, callback: F) -> u32

Source

fn nth_in_node_list<F: Fn(&Node) -> bool>( &self, index: u32, callback: F, ) -> Option<DomRoot<Node>>

Source

fn get_html_element(&self) -> Option<DomRoot<HTMLHtmlElement>>

Source

pub(crate) fn style_shared_lock(&self) -> &StyleSharedRwLock

Return a reference to the per-document shared lock used in stylesheets.

Source

pub(crate) fn flush_stylesheets_for_reflow(&self) -> bool

Flushes the stylesheet list, and returns whether any stylesheet changed.

Source

pub(crate) fn salvageable(&self) -> bool

Source

pub(crate) fn appropriate_template_contents_owner_document( &self, can_gc: CanGc, ) -> DomRoot<Document>

Source

pub(crate) fn get_element_by_id(&self, id: &Atom) -> Option<DomRoot<Element>>

Source

pub(crate) fn ensure_pending_restyle( &self, el: &Element, ) -> RefMut<'_, PendingRestyle>

Source

pub(crate) fn element_state_will_change(&self, element: &Element)

Source

pub(crate) fn element_attr_will_change(&self, el: &Element, attr: &Attr)

Source

pub(crate) fn set_referrer_policy(&self, policy: ReferrerPolicy)

Source

pub(crate) fn get_referrer_policy(&self) -> ReferrerPolicy

Source

pub(crate) fn set_target_element(&self, node: Option<&Element>)

Source

pub(crate) fn incr_ignore_destructive_writes_counter(&self)

Source

pub(crate) fn decr_ignore_destructive_writes_counter(&self)

Source

pub(crate) fn is_prompting_or_unloading(&self) -> bool

Source

fn incr_ignore_opens_during_unload_counter(&self)

Source

fn decr_ignore_opens_during_unload_counter(&self)

Source

pub(crate) fn enter_fullscreen( &self, pending: &Element, can_gc: CanGc, ) -> Rc<Promise>

Source

pub(crate) fn exit_fullscreen(&self, can_gc: CanGc) -> Rc<Promise>

Source

pub(crate) fn set_fullscreen_element(&self, element: Option<&Element>)

Source

pub(crate) fn get_allow_fullscreen(&self) -> bool

Source

fn reset_form_owner_for_listeners(&self, id: &Atom, can_gc: CanGc)

Source

pub(crate) fn register_shadow_root(&self, shadow_root: &ShadowRoot)

Source

pub(crate) fn unregister_shadow_root(&self, shadow_root: &ShadowRoot)

Source

pub(crate) fn invalidate_shadow_roots_stylesheets(&self)

Source

pub(crate) fn shadow_roots_styles_changed(&self) -> bool

Source

pub(crate) fn flush_shadow_roots_stylesheets(&self)

Source

pub(crate) fn stylesheet_count(&self) -> usize

Source

pub(crate) fn stylesheet_at( &self, index: usize, ) -> Option<DomRoot<CSSStyleSheet>>

Source

pub(crate) fn add_owned_stylesheet( &self, owner_node: &Element, sheet: Arc<Stylesheet>, )

Add a stylesheet owned by owner_node to the list of document sheets, in the correct tree position. Additionally, ensure that the owned stylesheet is inserted before any constructed stylesheet.

https://drafts.csswg.org/cssom/#documentorshadowroot-final-css-style-sheets

Source

pub(crate) fn append_constructed_stylesheet( &self, cssom_stylesheet: &CSSStyleSheet, )

Append a constructed stylesheet to the back of document stylesheet set. Because it would be the last element, we therefore would not mess with the ordering.

https://drafts.csswg.org/cssom/#documentorshadowroot-final-css-style-sheets

Source

pub(crate) fn load_web_fonts_from_stylesheet(&self, stylesheet: Arc<Stylesheet>)

Given a stylesheet, load all web fonts from it in Layout.

Source

pub(crate) fn remove_stylesheet( &self, owner: StylesheetSource, stylesheet: &Arc<Stylesheet>, )

Remove a stylesheet owned by owner from the list of document sheets.

Source

pub(crate) fn get_elements_with_id(&self, id: &Atom) -> Ref<'_, [Dom<Element>]>

Source

pub(crate) fn get_elements_with_name( &self, name: &Atom, ) -> Ref<'_, [Dom<Element>]>

Source

pub(crate) fn drain_pending_restyles( &self, ) -> Vec<(TrustedNodeAddress, PendingRestyle)>

Source

pub(crate) fn advance_animation_timeline_for_testing(&self, delta: f64)

Source

pub(crate) fn maybe_mark_animating_nodes_as_dirty(&self)

Source

pub(crate) fn current_animation_timeline_value(&self) -> f64

Source

pub(crate) fn animations(&self) -> Ref<'_, Animations>

Source

pub(crate) fn update_animations_post_reflow(&self)

Source

pub(crate) fn cancel_animations_for_node(&self, node: &Node)

Source

pub(crate) fn update_animations_and_send_events(&self, can_gc: CanGc)

Source

pub(crate) fn image_animation_manager(&self) -> Ref<'_, ImageAnimationManager>

Source

pub(crate) fn update_animating_images(&self)

Source

fn schedule_image_animation_update(&self, next_scheduled_time: f64)

Source

pub(crate) fn shared_declarative_refresh_steps(&self, content: &[u8])

Source

pub(crate) fn will_declaratively_refresh(&self) -> bool

Source

pub(crate) fn set_declarative_refresh(&self, refresh: DeclarativeRefresh)

Source

fn update_visibility_state( &self, visibility_state: DocumentVisibilityState, can_gc: CanGc, )

Source

pub(crate) fn is_initial_about_blank(&self) -> bool

Source

pub(crate) fn allow_declarative_shadow_roots(&self) -> bool

Source

pub(crate) fn has_trustworthy_ancestor_origin(&self) -> bool

Source

pub(crate) fn has_trustworthy_ancestor_or_current_origin(&self) -> bool

Source

pub(crate) fn highlight_dom_node(&self, node: Option<&Node>)

Source

pub(crate) fn highlighted_dom_node(&self) -> Option<DomRoot<Node>>

Trait Implementations§

§

impl Castable for Document

Source§

fn is<T>(&self) -> bool
where T: DerivedFrom<Self>,

Check whether a DOM object implements one of its deriving interfaces.
Source§

fn upcast<T>(&self) -> &T
where T: Castable, Self: DerivedFrom<T>,

Cast a DOM object upwards to one of the interfaces it derives from.
Source§

fn downcast<T>(&self) -> Option<&T>
where T: DerivedFrom<Self>,

Cast a DOM object downwards to one of the interfaces it might implement.
Source§

impl DocumentHelpers for Document

Source§

impl DocumentMethods<DomTypeHolder> for Document

Source§

fn CreateElement( &self, local_name: DOMString, options: StringOrElementCreationOptions, can_gc: CanGc, ) -> Fallible<DomRoot<Element>>

Source§

fn CreateElementNS( &self, namespace: Option<DOMString>, qualified_name: DOMString, options: StringOrElementCreationOptions, can_gc: CanGc, ) -> Fallible<DomRoot<Element>>

Source§

fn CreateAttribute( &self, local_name: DOMString, can_gc: CanGc, ) -> Fallible<DomRoot<Attr>>

Source§

fn NamedGetter( &self, name: DOMString, can_gc: CanGc, ) -> Option<NamedPropertyValue<DomTypeHolder>>

Source§

fn GetScrollingElement(&self) -> Option<DomRoot<Element>>

Source§

fn Hidden(&self) -> bool

Source§

fn VisibilityState(&self) -> DocumentVisibilityState

Source§

fn AdoptedStyleSheets( &self, context: JSContext, can_gc: CanGc, retval: MutableHandleValue<'_>, )

Source§

fn SetAdoptedStyleSheets( &self, context: JSContext, val: HandleValue<'_>, ) -> ErrorResult

Source§

fn Constructor( window: &Window, proto: Option<HandleObject<'_>>, can_gc: CanGc, ) -> Fallible<DomRoot<Document>>

Source§

fn QueryCommandSupported(&self, _command: DOMString) -> bool

Source§

fn StyleSheets(&self, can_gc: CanGc) -> DomRoot<StyleSheetList>

Source§

fn Implementation(&self, can_gc: CanGc) -> DomRoot<DOMImplementation>

Source§

fn URL(&self) -> USVString

Source§

fn GetActiveElement(&self) -> Option<DomRoot<Element>>

Source§

fn HasFocus(&self) -> bool

Source§

fn Domain(&self) -> DOMString

Source§

fn SetDomain(&self, value: DOMString) -> ErrorResult

Source§

fn Referrer(&self) -> DOMString

Source§

fn DocumentURI(&self) -> USVString

Source§

fn CompatMode(&self) -> DOMString

Source§

fn CharacterSet(&self) -> DOMString

Source§

fn Charset(&self) -> DOMString

Source§

fn InputEncoding(&self) -> DOMString

Source§

fn ContentType(&self) -> DOMString

Source§

fn GetDoctype(&self) -> Option<DomRoot<DocumentType>>

Source§

fn GetDocumentElement(&self) -> Option<DomRoot<Element>>

Source§

fn GetElementsByTagName( &self, qualified_name: DOMString, can_gc: CanGc, ) -> DomRoot<HTMLCollection>

Source§

fn GetElementsByTagNameNS( &self, maybe_ns: Option<DOMString>, tag_name: DOMString, can_gc: CanGc, ) -> DomRoot<HTMLCollection>

Source§

fn GetElementsByClassName( &self, classes: DOMString, can_gc: CanGc, ) -> DomRoot<HTMLCollection>

Source§

fn GetElementById(&self, id: DOMString) -> Option<DomRoot<Element>>

Source§

fn CreateAttributeNS( &self, namespace: Option<DOMString>, qualified_name: DOMString, can_gc: CanGc, ) -> Fallible<DomRoot<Attr>>

Source§

fn CreateDocumentFragment(&self, can_gc: CanGc) -> DomRoot<DocumentFragment>

Source§

fn CreateTextNode(&self, data: DOMString, can_gc: CanGc) -> DomRoot<Text>

Source§

fn CreateCDATASection( &self, data: DOMString, can_gc: CanGc, ) -> Fallible<DomRoot<CDATASection>>

Source§

fn CreateComment(&self, data: DOMString, can_gc: CanGc) -> DomRoot<Comment>

Source§

fn CreateProcessingInstruction( &self, target: DOMString, data: DOMString, can_gc: CanGc, ) -> Fallible<DomRoot<ProcessingInstruction>>

Source§

fn ImportNode( &self, node: &Node, deep: bool, can_gc: CanGc, ) -> Fallible<DomRoot<Node>>

Source§

fn AdoptNode(&self, node: &Node, can_gc: CanGc) -> Fallible<DomRoot<Node>>

Source§

fn CreateEvent( &self, interface: DOMString, can_gc: CanGc, ) -> Fallible<DomRoot<Event>>

Source§

fn LastModified(&self) -> DOMString

Source§

fn CreateRange(&self, can_gc: CanGc) -> DomRoot<Range>

Source§

fn CreateNodeIterator( &self, root: &Node, what_to_show: u32, filter: Option<Rc<NodeFilter<DomTypeHolder>>>, can_gc: CanGc, ) -> DomRoot<NodeIterator>

Source§

fn CreateTreeWalker( &self, root: &Node, what_to_show: u32, filter: Option<Rc<NodeFilter<DomTypeHolder>>>, ) -> DomRoot<TreeWalker>

Source§

fn Title(&self) -> DOMString

Source§

fn SetTitle(&self, title: DOMString, can_gc: CanGc)

Source§

fn GetHead(&self) -> Option<DomRoot<HTMLHeadElement>>

Source§

fn GetCurrentScript(&self) -> Option<DomRoot<HTMLScriptElement>>

Source§

fn GetBody(&self) -> Option<DomRoot<HTMLElement>>

Source§

fn SetBody(&self, new_body: Option<&HTMLElement>, can_gc: CanGc) -> ErrorResult

Source§

fn GetElementsByName(&self, name: DOMString, can_gc: CanGc) -> DomRoot<NodeList>

Source§

fn Images(&self, can_gc: CanGc) -> DomRoot<HTMLCollection>

Source§

fn Embeds(&self, can_gc: CanGc) -> DomRoot<HTMLCollection>

Source§

fn Plugins(&self, can_gc: CanGc) -> DomRoot<HTMLCollection>

Source§

fn Forms(&self, can_gc: CanGc) -> DomRoot<HTMLCollection>

Source§

fn Scripts(&self, can_gc: CanGc) -> DomRoot<HTMLCollection>

Source§

fn Anchors(&self, can_gc: CanGc) -> DomRoot<HTMLCollection>

Source§

fn Applets(&self, can_gc: CanGc) -> DomRoot<HTMLCollection>

Source§

fn GetLocation(&self) -> Option<DomRoot<Location>>

Source§

fn Children(&self, can_gc: CanGc) -> DomRoot<HTMLCollection>

Source§

fn GetFirstElementChild(&self) -> Option<DomRoot<Element>>

Source§

fn GetLastElementChild(&self) -> Option<DomRoot<Element>>

Source§

fn ChildElementCount(&self) -> u32

Source§

fn Prepend( &self, nodes: Vec<NodeOrString<DomTypeHolder>>, can_gc: CanGc, ) -> ErrorResult

Source§

fn Append( &self, nodes: Vec<NodeOrString<DomTypeHolder>>, can_gc: CanGc, ) -> ErrorResult

Source§

fn ReplaceChildren( &self, nodes: Vec<NodeOrString<DomTypeHolder>>, can_gc: CanGc, ) -> ErrorResult

Source§

fn QuerySelector( &self, selectors: DOMString, ) -> Fallible<Option<DomRoot<Element>>>

Source§

fn QuerySelectorAll(&self, selectors: DOMString) -> Fallible<DomRoot<NodeList>>

Source§

fn ReadyState(&self) -> DocumentReadyState

Source§

fn GetDefaultView(&self) -> Option<DomRoot<Window>>

Source§

fn GetCookie(&self) -> Fallible<DOMString>

Source§

fn SetCookie(&self, cookie: DOMString) -> ErrorResult

Source§

fn BgColor(&self) -> DOMString

Source§

fn SetBgColor(&self, value: DOMString, can_gc: CanGc)

Source§

fn FgColor(&self) -> DOMString

Source§

fn SetFgColor(&self, value: DOMString, can_gc: CanGc)

Source§

fn SupportedPropertyNames(&self) -> Vec<DOMString>

Source§

fn Clear(&self)

Source§

fn CaptureEvents(&self)

Source§

fn ReleaseEvents(&self)

Source§

fn GetOnblur(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnblur(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnerror(&self) -> Option<Rc<OnErrorEventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnerror( &self, listener: Option<Rc<OnErrorEventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnfocus(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnfocus(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnload(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnload(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnresize(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnresize(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnscroll(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnscroll(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnabort(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnabort(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnauxclick(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnauxclick( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnanimationstart(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnanimationstart( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnanimationiteration( &self, ) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnanimationiteration( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnanimationend(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnanimationend( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnanimationcancel(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnanimationcancel( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnbeforeinput(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnbeforeinput( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnbeforematch(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnbeforematch( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnbeforetoggle(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnbeforetoggle( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOncancel(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOncancel(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOncanplay(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOncanplay(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOncanplaythrough(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOncanplaythrough( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnchange(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnchange(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnclick(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnclick(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnclose(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnclose(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOncommand(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOncommand(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOncontextlost(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOncontextlost( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOncontextmenu(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOncontextmenu( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOncontextrestored(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOncontextrestored( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOncopy(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOncopy(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOncuechange(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOncuechange( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOncut(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOncut(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOndblclick(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOndblclick( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOndrag(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOndrag(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOndragend(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOndragend(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOndragenter(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOndragenter( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOndragleave(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOndragleave( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOndragover(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOndragover( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOndragstart(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOndragstart( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOndrop(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOndrop(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOndurationchange(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOndurationchange( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnemptied(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnemptied(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnended(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnended(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnformdata(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnformdata( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOninput(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOninput(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOninvalid(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOninvalid(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnkeydown(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnkeydown(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnkeypress(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnkeypress( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnkeyup(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnkeyup(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnloadeddata(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnloadeddata( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnloadedmetadata(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnloadedmetadata( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnloadstart(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnloadstart( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnmousedown(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnmousedown( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnmouseenter(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnmouseenter( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnmouseleave(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnmouseleave( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnmousemove(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnmousemove( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnmouseout(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnmouseout( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnmouseover(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnmouseover( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnmouseup(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnmouseup(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnpaste(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnpaste(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnpause(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnpause(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnplay(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnplay(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnplaying(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnplaying(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnprogress(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnprogress( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnratechange(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnratechange( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnreset(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnreset(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnscrollend(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnscrollend( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnsecuritypolicyviolation( &self, ) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnsecuritypolicyviolation( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnseeked(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnseeked(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnseeking(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnseeking(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnselect(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnselect(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnselectionchange(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnselectionchange( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnselectstart(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnselectstart( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnslotchange(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnslotchange( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnstalled(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnstalled(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnsubmit(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnsubmit(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnsuspend(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnsuspend(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOntimeupdate(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOntimeupdate( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOntoggle(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOntoggle(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOntransitioncancel( &self, ) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOntransitioncancel( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOntransitionend(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOntransitionend( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOntransitionrun(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOntransitionrun( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnvolumechange(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnvolumechange( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnwaiting(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnwaiting(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnwebkitanimationend( &self, ) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnwebkitanimationend( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnwebkitanimationiteration( &self, ) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnwebkitanimationiteration( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnwebkitanimationstart( &self, ) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnwebkitanimationstart( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnwebkittransitionend( &self, ) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnwebkittransitionend( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnwheel(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnwheel(&self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>)

Source§

fn GetOnreadystatechange( &self, ) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnreadystatechange( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn ElementFromPoint( &self, x: Finite<f64>, y: Finite<f64>, ) -> Option<DomRoot<Element>>

Source§

fn ElementsFromPoint( &self, x: Finite<f64>, y: Finite<f64>, ) -> Vec<DomRoot<Element>>

Source§

fn Open( &self, _unused1: Option<DOMString>, _unused2: Option<DOMString>, can_gc: CanGc, ) -> Fallible<DomRoot<Document>>

Source§

fn Open_( &self, url: USVString, target: DOMString, features: DOMString, can_gc: CanGc, ) -> Fallible<Option<DomRoot<WindowProxy>>>

Source§

fn Write( &self, text: Vec<TrustedHTMLOrString<DomTypeHolder>>, can_gc: CanGc, ) -> ErrorResult

Source§

fn Writeln( &self, text: Vec<TrustedHTMLOrString<DomTypeHolder>>, can_gc: CanGc, ) -> ErrorResult

Source§

fn Close(&self, can_gc: CanGc) -> ErrorResult

Source§

fn GetOnfullscreenerror(&self) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnfullscreenerror( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn GetOnfullscreenchange( &self, ) -> Option<Rc<EventHandlerNonNull<DomTypeHolder>>>

Source§

fn SetOnfullscreenchange( &self, listener: Option<Rc<EventHandlerNonNull<DomTypeHolder>>>, )

Source§

fn FullscreenEnabled(&self) -> bool

Source§

fn Fullscreen(&self) -> bool

Source§

fn GetFullscreenElement(&self) -> Option<DomRoot<Element>>

Source§

fn ExitFullscreen(&self, can_gc: CanGc) -> Rc<Promise>

Source§

fn ServoGetMediaControls(&self, id: DOMString) -> Fallible<DomRoot<ShadowRoot>>

Source§

fn GetSelection(&self, can_gc: CanGc) -> Option<DomRoot<Selection>>

Source§

fn Fonts(&self, can_gc: CanGc) -> DomRoot<FontFaceSet>

Source§

fn CreateExpression( &self, expression: DOMString, resolver: Option<Rc<XPathNSResolver<DomTypeHolder>>>, can_gc: CanGc, ) -> Fallible<DomRoot<XPathExpression>>

Source§

fn CreateNSResolver(&self, node_resolver: &Node, can_gc: CanGc) -> DomRoot<Node>

Source§

fn Evaluate( &self, expression: DOMString, context_node: &Node, resolver: Option<Rc<XPathNSResolver<DomTypeHolder>>>, type_: u16, result: Option<&XPathResult>, can_gc: CanGc, ) -> Fallible<DomRoot<XPathResult>>

Source§

impl DomObject for Document

Source§

fn reflector(&self) -> &Reflector

Returns the receiver’s reflector.
Source§

impl DomObjectWrap<DomTypeHolder> for Document

Source§

const WRAP: unsafe fn(SafeJSContext, &GlobalScope, Option<HandleObject<'_>>, Box<Self>, CanGc) -> Root<Dom<Self>> = {script_bindings::codegen::GenericBindings::DocumentBinding::Wrap::<dom::bindings::codegen::DomTypeHolder::DomTypeHolder> as for<'a, 'b> unsafe fn(script_bindings::script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::document::Document>, script_bindings::script_runtime::CanGc) -> script_bindings::root::Root<script_bindings::root::Dom<dom::document::Document>>}

Function pointer to the general wrap function type
Source§

impl HasParent for Document

Source§

fn as_parent(&self) -> &Node

This is used in a type assertion to ensure that the source and webidls agree as to what the parent type is

Source§

type Parent = Node

Source§

impl IDLInterface for Document

Source§

fn derives(class: &'static DOMClass) -> bool

Returns whether the given DOM class derives that interface.
Source§

impl MallocSizeOf for Document

Source§

fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize

Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself.
Source§

impl MutDomObject for Document

Source§

unsafe fn init_reflector(&self, obj: *mut JSObject)

Initializes the Reflector Read more
Source§

impl PartialEq for Document

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl ToJSValConvertible for Document

Source§

unsafe fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandleValue<'_>)

Convert self to a JSVal. JSAPI failure causes a panic.
Source§

impl Traceable for Document

Source§

unsafe fn trace(&self, tracer: *mut JSTracer)

Trace self.
§

impl DerivedFrom<Document> for Document

§

impl DerivedFrom<Document> for HTMLDocument

§

impl DerivedFrom<Document> for XMLDocument

§

impl DerivedFrom<EventTarget> for Document

§

impl DerivedFrom<Node> for Document

Source§

impl Eq for Document

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsVoidPtr for T

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<D, T> DomGlobalGeneric<D> for T
where D: DomTypes, T: DomObject,

Source§

fn global_(&self, realm: InRealm<'_>) -> Root<Dom<<D as DomTypes>::GlobalScope>>
where Self: Sized,

Returns the [GlobalScope] of the realm that the DomObject was created in. If this object is a Node, this will be different from it’s owning Document if adopted by. For Nodes it’s almost always better to use NodeTraits::owning_global.
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> Filterable for T

Source§

fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>

Creates a filterable data provider with the given name for debugging. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> MaybeBoxed<Box<T>> for T

Source§

fn maybe_boxed(self) -> Box<T>

Convert
Source§

impl<T> MaybeBoxed<T> for T

Source§

fn maybe_boxed(self) -> T

Convert
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> SafeToJSValConvertible for T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ThisReflector for T
where T: DomObject,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T