🥮 mooncakes.io

    #DOM API

    This package exposes low-level DOM bindings for the JavaScript backend. The API is intentionally thin and incomplete: it mirrors browser APIs, keeps nullability explicit, and avoids convenience layers. Most users should prefer the @html package and only drop to @dom for imperative interop.

    Warning: This package is JS-backend only and not guaranteed to stay stable. Using it may reduce cross-platform compatibility.

    #Quick examples

    #Query and set attributes

    ///|
    test {
    let doc = @dom.document()
    if doc.get_element_by_id("hero").to_option() is Some(el) {
    el.set_attribute("data-ready", "true")
    }
    }

    #Add an event listener

    ///|
    #cfg(target="js")
    test {
    if @dom.document().get_element_by_id("btn").to_option() is Some(el) {
    el.add_event_listener("click", event => {
    guard event.to_mouse_event() is Some(mouse) else { return }
    let _x = mouse.get_client_x()
    let _y = mouse.get_client_y()
    })
    }
    }

    #Canvas context

    ///|
    test {
    let doc = @dom.document()
    if doc.get_element_by_id("canvas").to_option() is Some(el) &&
    el.to_html_canvas_element() is Some(canvas) &&
    canvas.get_context("2d").to0() {
    ctx.fill_rect(0, 0, 100, 60)
    }
    }

    #Nullability and optional parameters

    • Values that can be null use @js.Nullable[T]. Convert them with to_option() and pattern match on Some/None.
    • Optional JS parameters use @js.Optional[T] with default @js.Optional::undefined().

    #Naming conventions and file structure

    • Each DOM type and its methods live in a corresponding file.
    • Types use CamelCase; methods use snake_case.
    • DOM properties are exposed as get_*/set_* methods.
    • Overloads are disambiguated with suffixes based on parameter shapes.
    • Union types use @js.UnionN[A, B, ...].
    • Conversions
      • Upcasts return the target type directly, use as_<type>.
      • Downcasts return T? and must be checked, use to_<type>.

    #Type relationships (partial)

    Event <- AnimationEvent <- BlobEvent <- BeforeUnloadEvent <- ClipboardEvent <- CloseEvent <- CompositionEvent <- CustomEvent <- UIEvent <- MouseEvent <- DragEvent <- FocusEvent <- InputEvent <- KeyboardEvent <- WheelEvent EventTarget <- Window <- Node <- Document <- DocumentFragment <- Element <- HTMLElement <- HTMLCanvasElement <- HTMLInputElement <- HTMLDialogElement <- HTMLImageElement <- HTMLMediaElement <- HTMLVideoElement <- SVGElement <- SVGGraphicsElement <- SVGImageElement

    #Contribution

    Contributions are welcome.

    If you would like to contribute a patch, please follow these guidelines:

    • Keep APIs low-level and explicit about nullability.
    • Follow the naming conventions above.
    • Add an MDN link near new extern bindings.
    • Prefer small, focused PRs.

    You can also contribute by reporting issues and bugs.

    ImageUnion

    https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage

    Listener

    type Listener = (Event) -> Unit

    PredefinedColorSpace

    type PredefinedColorSpace = String

    Possible values are "srgb" and "display-p3".

    IsElement

    pub trait IsElement : IsNode {
    fn as_element(Self) -> Element
    fn get_children(Self) -> Array[Element]
    fn query_selector(Self, String) -> Element?
    fn query_selector_all(Self, String) -> Array[Element]
    fn closest(Self, String) -> Element?
    fn matches(Self, String) -> Bool
    fn has_attribute(Self, String) -> Bool
    fn get_client_width(Self) -> Double
    fn get_client_height(Self) -> Double
    fn get_client_left(Self) -> Double
    fn get_client_top(Self) -> Double
    fn get_client_rects(Self) -> Array[DOMRect]
    fn set_pointer_capture(Self, Int) -> Unit
    fn release_pointer_capture(Self, Int) -> Unit
    fn has_pointer_capture(Self, Int) -> Bool
    fn set_attribute(Self, String, String) -> Unit
    fn get_attribute(Self, String) -> String?
    fn remove_attribute(Self, String) -> Unit
    fn set_property(Self, String,
    Value
    ) -> Unit
    fn get_property(Self, String) ->
    Optional
    [String]
    fn remove_property(Self, String) -> Unit
    fn scroll_into_view(Self, behavior? : String) -> Unit
    fn scroll_into_view_with_options(Self, behavior? : String, block? : String, inline? : String, container? : String) -> Unit
    fn get_scroll_top(Self) -> Double
    fn set_scroll_top(Self, Double) -> Unit
    fn get_scroll_left(Self) -> Double
    fn set_scroll_left(Self, Double) -> Unit
    fn get_scroll_width(Self) -> Double
    fn get_scroll_height(Self) -> Double
    fn set_inner_html(Self, String) -> Unit
    fn get_bounding_client_rect(Self) -> DOMRect
    fn get_animations(Self) -> Array[Animation]
    }

    IsEvent

    pub trait IsEvent :
    Cast
    {
    fn target(Self) -> EventTarget
    fn current_target(Self) ->
    Nullable
    [EventTarget]
    fn get_default_prevented(Self) -> Bool
    fn get_time_stamp(Self) -> Double
    fn composed_path(Self) -> Array[EventTarget]
    fn prevent_default(Self) -> Unit
    fn stop_propagation(Self) -> Unit
    fn stop_immediate_propagation(Self) -> Unit
    fn as_event(Self) -> Event
    fn to_ui_event(Self) -> UIEvent?
    fn to_clipboard_event(Self) -> ClipboardEvent?
    fn to_mouse_event(Self) -> MouseEvent?
    fn to_pointer_event(Self) -> PointerEvent?
    fn to_input_event(Self) -> InputEvent?
    fn to_focus_event(Self) -> FocusEvent?
    fn to_keyboard_event(Self) -> KeyboardEvent?
    fn to_animation_event(Self) -> AnimationEvent?
    fn to_before_unload_event(Self) -> BeforeUnloadEvent?
    fn to_blob_event(Self) -> BlobEvent?
    fn to_close_event(Self) -> CloseEvent?
    fn to_composition_event(Self) -> CompositionEvent?
    fn to_custom_event(Self) -> CustomEvent?
    fn to_drag_event(Self) -> DragEvent?
    fn to_message_event(Self) -> MessageEvent?
    fn to_wheel_event(Self) -> WheelEvent?
    }

    IsEventTarget

    pub trait IsEventTarget :
    Cast
    {
    fn as_event_target(Self) -> EventTarget
    fn add_event_listener(Self, String, (Event) -> Unit) -> Unit
    fn add_event_listener_with_options(Self, String, (Event) -> Unit, capture? : Bool, passive? : Bool, once? : Bool) -> Unit
    fn remove_event_listener(Self, String, (Event) -> Unit) -> Unit
    fn remove_event_listener_with_options(Self, String, (Event) -> Unit, capture? : Bool) -> Unit
    fn dispatch_event(Self, Event) -> Unit
    fn to_clipboard(Self) -> Clipboard?
    fn to_node(Self) -> Node?
    fn to_document(Self) -> Document?
    fn to_document_fragment(Self) -> DocumentFragment?
    fn to_element(Self) -> Element?
    fn to_html_element(Self) -> HTMLElement?
    fn to_html_canvas_element(Self) -> HTMLCanvasElement?
    fn to_html_input_element(Self) -> HTMLInputElement?
    fn to_html_dialog_element(Self) -> HTMLDialogElement?
    fn to_html_image_element(Self) -> HTMLImageElement?
    fn to_html_select_element(Self) -> HTMLSelectElement?
    fn to_html_media_element(Self) -> HTMLMediaElement?
    fn to_html_video_element(Self) -> HTMLVideoElement?
    fn to_text(Self) -> Text?
    fn to_comment(Self) -> Comment?
    fn to_svg_element(Self) -> SVGElement?
    fn to_svg_graphics_element(Self) -> SVGGraphicsElement?
    fn to_svg_image_element(Self) -> SVGImageElement?
    fn to_window(Self) -> Window?
    }

    IsHTMLMediaElement

    pub trait IsHTMLMediaElement : IsHtmlElement {
    fn as_html_media_element(Self) -> HTMLMediaElement
    fn get_audio_tracks(Self) -> AudioTrackList
    fn get_autoplay(Self) -> Bool
    fn set_autoplay(Self, Bool) -> Unit
    fn get_buffered(Self) -> TimeRanges
    fn get_controls(Self) -> Bool
    fn set_controls(Self, Bool) -> Unit
    fn get_controls_list(Self) -> DOMTokenList
    fn get_cross_origin(Self) -> String?
    fn set_cross_origin(Self, String?) -> Unit
    fn get_current_src(Self) -> String
    fn get_current_time(Self) -> Double
    fn set_current_time(Self, Double) -> Unit
    fn get_default_muted(Self) -> Bool
    fn set_default_muted(Self, Bool) -> Unit
    fn get_default_playback_rate(Self) -> Double
    fn set_default_playback_rate(Self, Double) -> Unit
    fn get_disable_remote_playback(Self) -> Bool
    fn set_disable_remote_playback(Self, Bool) -> Unit
    fn get_duration(Self) -> Double
    fn get_ended(Self) -> Bool
    fn get_error(Self) -> MediaError?
    fn get_loop(Self) -> Bool
    fn set_loop(Self, Bool) -> Unit
    fn get_media_keys(Self) -> MediaKeys?
    fn get_muted(Self) -> Bool
    fn set_muted(Self, Bool) -> Unit
    fn get_network_state(Self) -> Int
    fn get_paused(Self) -> Bool
    fn get_playback_rate(Self) -> Double
    fn set_playback_rate(Self, Double) -> Unit
    fn get_played(Self) -> TimeRanges
    fn get_preload(Self) -> String
    fn set_preload(Self, String) -> Unit
    fn get_preserves_pitch(Self) -> Bool
    fn set_preserves_pitch(Self, Bool) -> Unit
    fn get_ready_state(Self) -> Int
    fn get_remote(Self) -> RemotePlayback
    fn get_seekable(Self) -> TimeRanges
    fn get_seeking(Self) -> Bool
    fn get_sink_id(Self) -> String
    fn get_src(Self) -> String
    fn set_src(Self, String) -> Unit
    fn get_src_object(Self) ->
    Value
    ?
    fn set_src_object(Self,
    Value
    ?) -> Unit
    fn get_text_tracks(Self) -> TextTrackList
    fn get_video_tracks(Self) -> VideoTrackList
    fn get_volume(Self) -> Double
    fn set_volume(Self, Double) -> Unit
    fn add_text_track(Self, String, String?, String?) -> TextTrack
    fn capture_stream(Self) -> MediaStream
    fn can_play_type(Self, String) -> String
    fn fast_seek(Self, Double) -> Unit
    fn load(Self) -> Unit
    fn pause(Self) -> Unit
    fn seek_to_next_frame(Self) -> Unit
    }

    IsHtmlElement

    pub trait IsHtmlElement : IsElement {
    fn as_html_element(Self) -> HTMLElement
    fn get_access_key(Self) -> String
    fn set_access_key(Self, String) -> Unit
    fn get_access_key_label(Self) -> String
    fn get_anchor_element(Self) -> Element?
    fn get_attribute_style_map(Self) -> StylePropertyMap
    fn get_auto_capitalize(Self) -> String
    fn set_auto_capitalize(Self, String) -> Unit
    fn get_auto_focus(Self) -> Bool
    fn set_auto_focus(Self, Bool) -> Unit
    fn get_auto_correct(Self) -> Bool
    fn set_auto_correct(Self, Bool) -> Unit
    fn get_content_editable(Self) -> String
    fn set_content_editable(Self, String) -> Unit
    fn get_dataset(Self) -> DOMStringMap
    fn get_dir(Self) -> String
    fn set_dir(Self, String) -> Unit
    fn get_draggable(Self) -> Bool
    fn set_draggable(Self, Bool) -> Unit
    fn get_edit_context(Self) -> EditContext?
    fn set_edit_context(Self, EditContext?) -> Unit
    fn get_enter_key_hint(Self) -> String
    fn set_enter_key_hint(Self, String) -> Unit
    fn get_hidden(Self) ->
    Value

    fn set_hidden(Self,
    Value
    ) -> Unit
    fn get_inert(Self) -> Bool
    fn set_inert(Self, Bool) -> Unit
    fn get_inner_text(Self) -> String
    fn set_inner_text(Self, String) -> Unit
    fn get_input_mode(Self) -> String
    fn set_input_mode(Self, String) -> Unit
    fn get_is_content_editable(Self) -> Bool
    fn get_lang(Self) -> String
    fn set_lang(Self, String) -> Unit
    fn get_nonce(Self) -> String
    fn set_nonce(Self, String) -> Unit
    fn get_offset_height(Self) -> Double
    fn get_offset_left(Self) -> Double
    fn get_offset_parent(Self) -> Element?
    fn get_offset_top(Self) -> Double
    fn get_offset_width(Self) -> Double
    fn get_outer_text(Self) -> String
    fn set_outer_text(Self, String) -> Unit
    fn get_popover(Self) -> String?
    fn set_popover(Self, String?) -> Unit
    fn get_spellcheck(Self) -> Bool
    fn set_spellcheck(Self, Bool) -> Unit
    fn get_style(Self) -> CSSStyleDeclaration
    fn set_style_declaration(Self, CSSStyleDeclaration) -> Unit
    fn get_tab_index(Self) -> Int
    fn set_tab_index(Self, Int) -> Unit
    fn get_title(Self) -> String
    fn set_title(Self, String) -> Unit
    fn get_translate(Self) -> Bool
    fn set_translate(Self, Bool) -> Unit
    fn get_virtual_keyboard_policy(Self) -> String
    fn set_virtual_keyboard_policy(Self, String) -> Unit
    fn get_writing_suggestions(Self) -> String
    fn set_writing_suggestions(Self, String) -> Unit
    fn attach_internals(Self) -> ElementInternals
    fn blur(Self) -> Unit
    fn click(Self) -> Unit
    fn focus(Self) -> Unit
    fn focus_with_options(Self, prevent_scroll? : Bool, focus_visible? : Bool) -> Unit
    fn hide_popover(Self) -> Unit
    fn show_popover(Self) -> Unit
    fn toggle_popover(Self, Bool?) -> Bool
    }

    IsMouseEvent

    pub trait IsMouseEvent : IsUIEvent {
    fn as_mouse_event(Self) -> MouseEvent
    fn get_alt_key(Self) -> Bool
    fn get_button(Self) -> Int
    fn get_buttons(Self) -> Int
    fn get_client_x(Self) -> Int
    fn get_client_y(Self) -> Int
    fn get_ctrl_key(Self) -> Bool
    fn get_meta_key(Self) -> Bool
    fn get_movement_x(Self) -> Int
    fn get_movement_y(Self) -> Int
    fn get_offset_x(Self) -> Int
    fn get_offset_y(Self) -> Int
    fn get_page_x(Self) -> Int
    fn get_page_y(Self) -> Int
    fn get_related_target(Self) -> EventTarget?
    fn get_screen_x(Self) -> Int
    fn get_screen_y(Self) -> Int
    fn get_shift_key(Self) -> Bool
    fn get_x(Self) -> Int
    fn get_y(Self) -> Int
    fn get_modifier_state(Self) -> Int
    }

    IsNode

    pub trait IsNode : IsEventTarget {
    fn as_node(Self) -> Node
    fn get_node_type(Self) -> Int
    fn get_node_name(Self) -> String
    fn get_node_value(Self) -> String
    fn set_node_value(Self,
    Nullable
    [String]) -> Unit
    fn get_first_child(Self) -> Node
    fn get_last_child(Self) -> Node
    fn get_next_sibling(Self) ->
    Nullable
    [Node]
    fn get_previous_sibling(Self) ->
    Nullable
    [Node]
    fn get_parent_node(Self) ->
    Nullable
    [Node]
    fn get_parent_element(Self) -> Element?
    fn get_is_connected(Self) -> Bool
    fn contains(Self, Node) -> Bool
    fn append_child(Self, Node) -> Unit
    fn remove_child(Self, Node) -> Unit
    fn replace_child(Self, Node, Node) -> Unit
    fn insert_before(Self, Node,
    Nullable
    [Node]) -> Unit
    fn get_child(Self, Int) -> Node
    fn get_child_count(Self) -> Int
    fn is_same_node(Self, Node) -> Bool
    }

    IsSVGElement

    pub trait IsSVGElement : IsElement {
    fn as_svg_element(Self) -> SVGElement
    fn get_attribute_style_map(Self) -> StylePropertyMap
    fn get_auto_focus(Self) -> Bool
    fn set_auto_focus(Self, Bool) -> Unit
    fn get_data_set(Self) -> DOMStringMap
    fn get_nonce(Self) -> String
    fn set_nonce(Self, String) -> Unit
    fn get_owner_svg_element(Self) -> SVGElement?
    fn get_style(Self) -> CSSStyleDeclaration
    fn set_style(Self, CSSStyleDeclaration) -> Unit
    fn get_tab_index(Self) -> Int
    fn set_tab_index(Self, Int) -> Unit
    fn get_viewport_element(Self) -> SVGElement?
    fn blur(Self) -> Unit
    fn focus(Self) -> Unit
    }

    IsSVGGraphicsElement

    pub trait IsSVGGraphicsElement : IsSVGElement {
    fn as_svg_graphics_element(Self) -> SVGGraphicsElement
    fn get_required_extensions(Self) -> String
    fn get_system_language(Self) -> SVGStringList
    fn get_transform(Self) -> SVGAnimatedTransformList
    fn get_bbox(Self) -> DOMRect
    fn get_ctm(Self) -> DOMMatrix
    fn get_screen_ctm(Self) -> DOMMatrix
    }

    IsUIEvent

    pub trait IsUIEvent : IsEvent {
    fn as_ui_event(Self) -> UIEvent
    }

    Animation

    type Animation

    https://developer.mozilla.org/en-US/docs/Web/API/Animation

    Animation::finish

    fn Animation::finish(self : Animation) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/Animation/finish

    AnimationEvent

    type AnimationEvent

    https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent

    AnimationEvent::get_animation_name

    fn AnimationEvent::get_animation_name(self : AnimationEvent) -> String

    AnimationEvent::get_elapsed_time

    fn AnimationEvent::get_elapsed_time(self : AnimationEvent) -> Double

    AnimationEvent::get_pseudo_element

    fn AnimationEvent::get_pseudo_element(self : AnimationEvent) -> String

    AudioTrackList

    type AudioTrackList

    BeforeUnloadEvent

    type BeforeUnloadEvent

    https://developer.mozilla.org/en-US/docs/Web/API/BeforeUnloadEvent

    Blob

    type Blob

    Blob::bytes

    async fn Blob::bytes(self : Blob) -> Bytes

    Blob::from_bytes

    fn Blob::from_bytes(bytes : Bytes, content_type : String) -> Blob

    Blob::get_size

    fn Blob::get_size(self : Blob) -> Int

    Blob::get_type

    fn Blob::get_type(self : Blob) -> String

    Blob::slice

    fn Blob::slice(self : Blob, start : Int, end_? :
    Optional
    [Int]) -> Blob

    Blob::text

    async fn Blob::text(self : Blob) -> String

    BlobEvent

    type BlobEvent

    https://developer.mozilla.org/en-US/docs/Web/API/BlobEvent

    BlobEvent::get_data

    fn BlobEvent::get_data(self : BlobEvent) -> Blob

    BlobEvent::get_timecode

    fn BlobEvent::get_timecode(self : BlobEvent) -> Double

    BlobEvent::new

    fn BlobEvent::new() -> BlobEvent

    CSS

    type CSS

    https://developer.mozilla.org/en-US/docs/Web/API/CSS

    CSS::supports

    fn CSS::supports(property : String, value : String) -> Bool

    https://developer.mozilla.org/en-US/docs/Web/API/CSS/supports_static

    CSSRule

    type CSSRule

    CSSStyleDeclaration

    type CSSStyleDeclaration

    The CSSStyleDeclaration interface represents an object that is a CSS declaration block, and exposes style information and various style-related methods and properties.

    CSSStyleDeclaration::get

    #alias("_[_]")
    fn CSSStyleDeclaration::get(self : CSSStyleDeclaration, property : String) -> String

    Same as get_property_value

    CSSStyleDeclaration::get_css_float

    fn CSSStyleDeclaration::get_css_float(self : CSSStyleDeclaration) -> String

    Special alias for the float CSS property.

    CSSStyleDeclaration::get_css_text

    fn CSSStyleDeclaration::get_css_text(self : CSSStyleDeclaration) -> String

    Textual representation of the declaration block, if and only if it is exposed via HTMLElement.style.

    CSSStyleDeclaration::get_length

    fn CSSStyleDeclaration::get_length(self : CSSStyleDeclaration) -> Int

    The number of properties.

    CSSStyleDeclaration::get_parent_rule

    fn CSSStyleDeclaration::get_parent_rule(self : CSSStyleDeclaration) -> CSSRule?

    The containing CSSRule.

    CSSStyleDeclaration::get_property_priority

    fn CSSStyleDeclaration::get_property_priority(self : CSSStyleDeclaration, property : String) -> String

    Returns the optional priority, "important".

    CSSStyleDeclaration::get_property_value

    fn CSSStyleDeclaration::get_property_value(self : CSSStyleDeclaration, property : String) -> String

    Returns the property value given a property name.

    CSSStyleDeclaration::item

    fn CSSStyleDeclaration::item(self : CSSStyleDeclaration, index : Int) -> String

    Returns a CSS property name by its index, or the empty string if the index is out-of-bounds.

    CSSStyleDeclaration::remove_property

    fn CSSStyleDeclaration::remove_property(self : CSSStyleDeclaration, property : String) -> String

    Removes a property from the CSS declaration block.

    CSSStyleDeclaration::set

    #alias("_[_]=_")
    fn CSSStyleDeclaration::set(self : CSSStyleDeclaration, property : String, value : String) -> Unit

    Same as set_property

    CSSStyleDeclaration::set_css_float

    fn CSSStyleDeclaration::set_css_float(self : CSSStyleDeclaration, value : String) -> Unit

    Special alias for the float CSS property.

    CSSStyleDeclaration::set_css_text

    fn CSSStyleDeclaration::set_css_text(self : CSSStyleDeclaration, value : String) -> Unit

    Textual representation of the declaration block, if and only if it is exposed via HTMLElement.style.

    CSSStyleDeclaration::set_property

    fn CSSStyleDeclaration::set_property(self : CSSStyleDeclaration, property : String, value : String) -> Unit

    Modifies an existing CSS property or creates a new CSS property in the declaration block.

    CSSStyleDeclaration::set_property_with_priority

    fn CSSStyleDeclaration::set_property_with_priority(self : CSSStyleDeclaration, property : String, value : String, priority : String) -> Unit

    Modifies an existing CSS property or creates a new CSS property in the declaration block with priority.

    CanvasGradient

    type CanvasGradient

    CanvasGradient::add_color_stop

    fn CanvasGradient::add_color_stop(self : CanvasGradient, offset : Double, color : String) -> Unit

    CanvasLineCap

    type CanvasLineCap

    CanvasLineJoin

    type CanvasLineJoin

    CanvasRenderingContext2D

    type CanvasRenderingContext2D

    CanvasRenderingContext2D::arc

    fn CanvasRenderingContext2D::arc(self : CanvasRenderingContext2D, x : Double, y : Double, radius : Double, start_angle : Double, end_angle : Double, anticlockwise? : Bool) -> Unit

    CanvasRenderingContext2D::arc_to

    fn CanvasRenderingContext2D::arc_to(self : CanvasRenderingContext2D, x1 : Double, y1 : Double, x2 : Double, y2 : Double, radius : Double) -> Unit

    CanvasRenderingContext2D::begin_path

    fn CanvasRenderingContext2D::begin_path(self : CanvasRenderingContext2D) -> Unit

    CanvasRenderingContext2D::bezier_curve_to

    fn CanvasRenderingContext2D::bezier_curve_to(self : CanvasRenderingContext2D, cp1x : Double, cp1y : Double, cp2x : Double, cp2y : Double, x : Double, y : Double) -> Unit

    CanvasRenderingContext2D::clear_rect

    fn CanvasRenderingContext2D::clear_rect(self : CanvasRenderingContext2D, x : Double, y : Double, w : Double, h : Double) -> Unit

    CanvasRenderingContext2D::clip

    fn CanvasRenderingContext2D::clip(self : CanvasRenderingContext2D, fill_rule? : String) -> Unit

    CanvasRenderingContext2D::clip_with_path

    fn CanvasRenderingContext2D::clip_with_path(self : CanvasRenderingContext2D, path : Path2D, fill_rule? : String) -> Unit

    CanvasRenderingContext2D::close_path

    fn CanvasRenderingContext2D::close_path(self : CanvasRenderingContext2D) -> Unit

    CanvasRenderingContext2D::create_image_data

    CanvasRenderingContext2D::create_image_data_with_data

    fn CanvasRenderingContext2D::create_image_data_with_data(self : CanvasRenderingContext2D, data : ImageData) -> ImageData

    CanvasRenderingContext2D::create_linear_gradient

    fn CanvasRenderingContext2D::create_linear_gradient(self : CanvasRenderingContext2D, x0 : Double, y0 : Double, x1 : Double, y1 : Double) -> CanvasGradient

    CanvasRenderingContext2D::create_radial_gradient

    fn CanvasRenderingContext2D::create_radial_gradient(self : CanvasRenderingContext2D, x0 : Double, y0 : Double, r0 : Double, x1 : Double, y1 : Double, r1 : Double) -> CanvasGradient

    CanvasRenderingContext2D::draw_image

    https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage

    CanvasRenderingContext2D::draw_image_with_size

    https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage

    CanvasRenderingContext2D::draw_image_with_src_and_dst_size

    fn CanvasRenderingContext2D::draw_image_with_src_and_dst_size(self : CanvasRenderingContext2D, image :
    Union7
    [HTMLImageElement, SVGImageElement, HTMLVideoElement, HTMLCanvasElement, ImageBitmap, OffscreenCanvas, VideoFrame], sx : Double, sy : Double, sw : Double, sh : Double, dx : Double, dy : Double, dw : Double, dh : Double) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage

    CanvasRenderingContext2D::ellipse

    fn CanvasRenderingContext2D::ellipse(self : CanvasRenderingContext2D, x : Double, y : Double, radius_x : Double, radius_y : Double, rotation : Double, start_angle : Double, end_angle : Double, anticlockwise? : Bool) -> Unit

    CanvasRenderingContext2D::fill

    fn CanvasRenderingContext2D::fill(self : CanvasRenderingContext2D, fill_rule? : String) -> Unit

    CanvasRenderingContext2D::fill_path

    fn CanvasRenderingContext2D::fill_path(self : CanvasRenderingContext2D, path : Path2D, fill_rule? : String) -> Unit

    CanvasRenderingContext2D::fill_rect

    fn CanvasRenderingContext2D::fill_rect(self : CanvasRenderingContext2D, x : Double, y : Double, w : Double, h : Double) -> Unit

    CanvasRenderingContext2D::fill_text

    fn CanvasRenderingContext2D::fill_text(self : CanvasRenderingContext2D, text : String, x : Double, y : Double, max_width? :
    Optional
    [Double]) -> Unit

    CanvasRenderingContext2D::get_font

    fn CanvasRenderingContext2D::get_font(self : CanvasRenderingContext2D) -> String

    https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/font

    CanvasRenderingContext2D::get_image_data

    fn CanvasRenderingContext2D::get_image_data(self : CanvasRenderingContext2D, sx : Double, sy : Double, sw : Double, sh : Double, settings? :
    Optional
    [ImageDataSettings]) -> ImageData

    CanvasRenderingContext2D::get_image_smoothing_quality

    fn CanvasRenderingContext2D::get_image_smoothing_quality(self : CanvasRenderingContext2D) -> String

    CanvasRenderingContext2D::get_line_cap

    CanvasRenderingContext2D::get_line_join

    CanvasRenderingContext2D::get_line_with

    fn CanvasRenderingContext2D::get_line_with(self : CanvasRenderingContext2D) -> Double

    CanvasRenderingContext2D::get_stroke_style

    CanvasRenderingContext2D::image_smoothing_enabled

    fn CanvasRenderingContext2D::image_smoothing_enabled(self : CanvasRenderingContext2D) -> Bool

    CanvasRenderingContext2D::is_context_lost

    fn CanvasRenderingContext2D::is_context_lost(self : CanvasRenderingContext2D) -> Bool

    CanvasRenderingContext2D::is_point_in_path

    fn CanvasRenderingContext2D::is_point_in_path(self : CanvasRenderingContext2D, x : Double, y : Double, fill_rule? : String) -> Bool

    CanvasRenderingContext2D::is_point_in_path_with_path

    fn CanvasRenderingContext2D::is_point_in_path_with_path(self : CanvasRenderingContext2D, path : Path2D, x : Double, y : Double, fill_rule? : String) -> Bool

    CanvasRenderingContext2D::is_point_in_stroke

    fn CanvasRenderingContext2D::is_point_in_stroke(self : CanvasRenderingContext2D, x : Double, y : Double) -> Bool

    CanvasRenderingContext2D::is_point_in_stroke_with_path

    fn CanvasRenderingContext2D::is_point_in_stroke_with_path(self : CanvasRenderingContext2D, path : Path2D, x : Double, y : Double) -> Bool

    CanvasRenderingContext2D::line_to

    fn CanvasRenderingContext2D::line_to(self : CanvasRenderingContext2D, x : Double, y : Double) -> Unit

    CanvasRenderingContext2D::move_to

    fn CanvasRenderingContext2D::move_to(self : CanvasRenderingContext2D, x : Double, y : Double) -> Unit

    CanvasRenderingContext2D::put_image_data

    fn CanvasRenderingContext2D::put_image_data(self : CanvasRenderingContext2D, image_data : ImageData, dx : Int, dy : Int) -> Unit

    CanvasRenderingContext2D::put_image_data_with_dirty

    fn CanvasRenderingContext2D::put_image_data_with_dirty(self : CanvasRenderingContext2D, image_data : ImageData, dx : Int, dy : Int, dirty_x : Int, dirty_y : Int, dirty_width : Int, dirty_height : Int) -> Unit

    CanvasRenderingContext2D::quardratic_curve_to

    fn CanvasRenderingContext2D::quardratic_curve_to(self : CanvasRenderingContext2D, cpx : Double, cpy : Double, x : Double, y : Double) -> Unit

    CanvasRenderingContext2D::rect

    fn CanvasRenderingContext2D::rect(self : CanvasRenderingContext2D, x : Double, y : Double, w : Double, h : Double) -> Unit

    CanvasRenderingContext2D::reset

    CanvasRenderingContext2D::reset_transform

    fn CanvasRenderingContext2D::reset_transform(self : CanvasRenderingContext2D) -> Unit

    CanvasRenderingContext2D::restore

    CanvasRenderingContext2D::rotate

    fn CanvasRenderingContext2D::rotate(self : CanvasRenderingContext2D, angle : Double) -> Unit

    CanvasRenderingContext2D::round_rect

    fn CanvasRenderingContext2D::round_rect(self : CanvasRenderingContext2D, x : Double, y : Double, w : Double, h : Double, radius : Double) -> Unit

    CanvasRenderingContext2D::save

    CanvasRenderingContext2D::scale

    fn CanvasRenderingContext2D::scale(self : CanvasRenderingContext2D, x : Double, y : Double) -> Unit

    CanvasRenderingContext2D::set_fill_style

    CanvasRenderingContext2D::set_font

    fn CanvasRenderingContext2D::set_font(self : CanvasRenderingContext2D, value : String) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/font

    CanvasRenderingContext2D::set_image_smoothing_quality

    fn CanvasRenderingContext2D::set_image_smoothing_quality(self : CanvasRenderingContext2D, value : String) -> Unit

    Possible values are "low", "medium", and "high".

    CanvasRenderingContext2D::set_line_cap

    fn CanvasRenderingContext2D::set_line_cap(self : CanvasRenderingContext2D, value : CanvasLineCap) -> Unit

    CanvasRenderingContext2D::set_line_join

    fn CanvasRenderingContext2D::set_line_join(self : CanvasRenderingContext2D, value : CanvasLineJoin) -> Unit

    CanvasRenderingContext2D::set_line_width

    fn CanvasRenderingContext2D::set_line_width(self : CanvasRenderingContext2D, value : Double) -> Unit

    CanvasRenderingContext2D::set_stroke_style

    CanvasRenderingContext2D::set_transform

    fn CanvasRenderingContext2D::set_transform(self : CanvasRenderingContext2D, a : Double, b : Double, c : Double, d : Double, e : Double, f : Double) -> Unit

    CanvasRenderingContext2D::stroke

    CanvasRenderingContext2D::stroke_rect

    fn CanvasRenderingContext2D::stroke_rect(self : CanvasRenderingContext2D, x : Double, y : Double, w : Double, h : Double) -> Unit

    CanvasRenderingContext2D::stroke_text

    fn CanvasRenderingContext2D::stroke_text(self : CanvasRenderingContext2D, text : String, x : Double, y : Double, max_width? :
    Optional
    [Double]) -> Unit

    CanvasRenderingContext2D::stroke_with_path

    fn CanvasRenderingContext2D::stroke_with_path(self : CanvasRenderingContext2D, path : Path2D) -> Unit

    CanvasRenderingContext2D::transform

    fn CanvasRenderingContext2D::transform(self : CanvasRenderingContext2D, a : Double, b : Double, c : Double, d : Double, e : Double, f : Double) -> Unit

    CanvasRenderingContext2D::translate

    fn CanvasRenderingContext2D::translate(self : CanvasRenderingContext2D, x : Double, y : Double) -> Unit

    Clipboard

    #external
    pub type Clipboard

    Clipboard::write_text

    ClipboardEvent

    type ClipboardEvent

    CloseEvent

    type CloseEvent

    https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent

    CloseEvent::get_code

    fn CloseEvent::get_code(self : CloseEvent) -> Int

    CloseEvent::get_reason

    fn CloseEvent::get_reason(self : CloseEvent) -> String

    CloseEvent::get_was_clean

    fn CloseEvent::get_was_clean(self : CloseEvent) -> Bool

    Comment

    type Comment

    CompositionEvent

    type CompositionEvent

    https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent

    CompositionEvent::get_data

    fn CompositionEvent::get_data(self : CompositionEvent) -> String

    CompositionEvent::new

    CustomEvent

    type CustomEvent

    DOMException

    type DOMException

    DOMException::get_message

    fn DOMException::get_message(self : DOMException) -> String

    DOMException::get_name

    fn DOMException::get_name(self : DOMException) -> String

    DOMException::new

    DOMException::new_with_message

    fn DOMException::new_with_message(message : String) -> DOMException

    DOMException::new_with_message_and_name

    fn DOMException::new_with_message_and_name(message : String, name : String) -> DOMException

    DOMMatrix

    type DOMMatrix

    DOMMatrix2DInit

    type DOMMatrix2DInit

    DOMRect

    type DOMRect

    DOMRect::get_bottom

    fn DOMRect::get_bottom(self : DOMRect) -> Double

    DOMRect::get_height

    fn DOMRect::get_height(self : DOMRect) -> Double

    DOMRect::get_left

    fn DOMRect::get_left(self : DOMRect) -> Double

    DOMRect::get_right

    fn DOMRect::get_right(self : DOMRect) -> Double

    DOMRect::get_top

    fn DOMRect::get_top(self : DOMRect) -> Double

    DOMRect::get_width

    fn DOMRect::get_width(self : DOMRect) -> Double

    DOMRect::get_x

    fn DOMRect::get_x(self : DOMRect) -> Double

    DOMRect::get_y

    fn DOMRect::get_y(self : DOMRect) -> Double

    DOMStringMap

    type DOMStringMap

    DOMTokenList

    type DOMTokenList

    DataTransfer

    type DataTransfer

    DataTransfer::drop_effect

    fn DataTransfer::drop_effect(self : DataTransfer) -> String

    DataTransfer::effect_allowed

    fn DataTransfer::effect_allowed(self : DataTransfer) -> String

    DataTransfer::items

    DataTransfer::set_drog_image

    fn DataTransfer::set_drog_image(self : DataTransfer, image : Element, x : Int, y : Int) -> Unit

    DataTransferItemList

    type DataTransferItemList

    DataTransferItemList::add

    fn DataTransferItemList::add(self : DataTransferItemList, data : String, type_ : String) -> Unit

    DataTransferItemList::clear

    fn DataTransferItemList::clear(self : DataTransferItemList) -> Unit

    DataTransferItemList::get

    #alias("_[_]")
    fn DataTransferItemList::get(self : DataTransferItemList, index : Int) -> Unit

    DataTransferItemList::length

    fn DataTransferItemList::length(self : DataTransferItemList) -> Int

    DataTransferItemList::remove

    fn DataTransferItemList::remove(self : DataTransferItemList, index : Int) -> Unit

    Document

    type Document

    Document::create_comment

    fn Document::create_comment(self : Document, str : String) -> Comment

    Document::create_document_fragment

    fn Document::create_document_fragment(self : Document) -> DocumentFragment

    Document::create_element

    fn Document::create_element(self : Document, tag : String) -> Element

    Document::create_element_ns

    fn Document::create_element_ns(self : Document, namespace_uri : String, qualified_name : String, on_namespace_error? : (DOMException) -> Element, on_invalid_character_error? : (DOMException) -> Element) -> Element

    Document::create_text_node

    fn Document::create_text_node(self : Document, str : String) -> Element

    Document::element_from_point

    fn Document::element_from_point(self : Document, x : Double, y : Double) -> Element?

    https://developer.mozilla.org/en-US/docs/Web/API/Document/elementFromPoint

    Document::elements_from_point

    fn Document::elements_from_point(self : Document, x : Double, y : Double) -> Array[Element]

    https://developer.mozilla.org/en-US/docs/Web/API/Document/elementsFromPoint

    Document::get_active_element

    fn Document::get_active_element(self : Document) -> Element?

    https://developer.mozilla.org/en-US/docs/Web/API/Document/activeElement

    Document::get_body

    fn Document::get_body(self : Document) -> HTMLElement?

    https://developer.mozilla.org/en-US/docs/Web/API/Document/body

    Document::get_document_element

    fn Document::get_document_element(self : Document) -> Element?

    https://developer.mozilla.org/en-US/docs/Web/API/Document/documentElement

    Document::get_element_by_id

    fn Document::get_element_by_id(self : Document, id : String) ->
    Nullable
    [Element]

    https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById

    Document::get_elements_by_class_name

    fn Document::get_elements_by_class_name(self : Document, names : String) -> HTMLCollection

    https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName

    Document::get_elements_by_name

    fn Document::get_elements_by_name(self : Document, name : String) -> NodeList

    https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByName

    Document::get_elements_by_tag_name

    fn Document::get_elements_by_tag_name(self : Document, tag : String) -> HTMLCollection

    https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByTagName

    Document::get_elements_by_tag_name_ns

    fn Document::get_elements_by_tag_name_ns(self : Document, namespace_ : String, name : String) -> HTMLCollection

    https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByTagNameNS

    Document::get_head

    fn Document::get_head(self : Document) -> HTMLElement?

    https://developer.mozilla.org/en-US/docs/Web/API/Document/head

    Document::hidden

    fn Document::hidden(self : Document) -> Bool

    https://developer.mozilla.org/en-US/docs/Web/API/Document/hidden

    Document::query_selector

    fn Document::query_selector(self : Document, selectors : String) ->
    Nullable
    [Element]

    https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector

    Document::query_selector_all

    fn Document::query_selector_all(self : Document, selectors : String) -> NodeList

    https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll

    Document::to_node

    fn Document::to_node(self : Document) -> Node

    DragEvent

    type DragEvent

    EditContext

    type EditContext

    ElementInternals

    type ElementInternals

    Event

    type Event

    impl IsEvent for Event

    Event::new

    fn Event::new(type_ : String, bubbles? : Bool, cancelable? : Bool, composed? : Bool) -> Event

    https://developer.mozilla.org/en-US/docs/Web/API/Event/Event

    FocusEvent

    type FocusEvent

    FocusEvent::related_target

    fn FocusEvent::related_target(self : FocusEvent) -> EventTarget?

    https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/relatedTarget

    GPUCanvasContext

    type GPUCanvasContext

    HTMLCollection

    type HTMLCollection

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLCollection

    HTMLCollection::get_length

    fn HTMLCollection::get_length(self : HTMLCollection) -> Double

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLCollection/length

    HTMLCollection::item

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLCollection/item

    HTMLCollection::named_item

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLCollection/namedItem

    HTMLDialogElement

    type HTMLDialogElement

    HTMLDialogElement::close

    HTMLDialogElement::open

    fn HTMLDialogElement::open(self : HTMLDialogElement) -> Bool

    HTMLDialogElement::request_close

    fn HTMLDialogElement::request_close(self : HTMLDialogElement, return_value? :
    Optional
    [String]) -> Unit

    HTMLDialogElement::return_value

    fn HTMLDialogElement::return_value(self : HTMLDialogElement) -> String

    HTMLDialogElement::show

    fn HTMLDialogElement::show(self : HTMLDialogElement) -> Unit

    HTMLDialogElement::show_modal

    fn HTMLDialogElement::show_modal(self : HTMLDialogElement) -> Unit

    HTMLElement

    type HTMLElement

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement

    HTMLImageElement

    type HTMLImageElement

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/fetchPriority

    HTMLImageElement::get_alt

    fn HTMLImageElement::get_alt(self : HTMLImageElement) -> String

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt

    HTMLImageElement::get_complete

    fn HTMLImageElement::get_complete(self : HTMLImageElement) -> Bool

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/complete

    HTMLImageElement::get_cross_origin

    fn HTMLImageElement::get_cross_origin(self : HTMLImageElement) -> String

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/crossOrigin

    HTMLImageElement::get_current_src

    fn HTMLImageElement::get_current_src(self : HTMLImageElement) -> String

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/currentSrc

    HTMLImageElement::get_decoding

    fn HTMLImageElement::get_decoding(self : HTMLImageElement) -> String

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/decoding

    HTMLImageElement::get_height

    fn HTMLImageElement::get_height(self : HTMLImageElement) -> Double

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/height

    HTMLImageElement::get_is_map

    fn HTMLImageElement::get_is_map(self : HTMLImageElement) -> Bool

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/isMap

    HTMLImageElement::get_loading

    fn HTMLImageElement::get_loading(self : HTMLImageElement) -> String

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/loading

    HTMLImageElement::get_natural_height

    fn HTMLImageElement::get_natural_height(self : HTMLImageElement) -> Double

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/naturalHeight

    HTMLImageElement::get_natural_width

    fn HTMLImageElement::get_natural_width(self : HTMLImageElement) -> Double

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/naturalWidth

    HTMLImageElement::get_referrer_policy

    fn HTMLImageElement::get_referrer_policy(self : HTMLImageElement) -> String

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/referrerPolicy

    HTMLImageElement::get_sizes

    fn HTMLImageElement::get_sizes(self : HTMLImageElement) -> String

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/sizes

    HTMLImageElement::get_src

    fn HTMLImageElement::get_src(self : HTMLImageElement) -> String

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/src

    HTMLImageElement::get_srcset

    fn HTMLImageElement::get_srcset(self : HTMLImageElement) -> String

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/srcset

    HTMLImageElement::get_use_map

    fn HTMLImageElement::get_use_map(self : HTMLImageElement) -> String

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/useMap

    HTMLImageElement::get_width

    fn HTMLImageElement::get_width(self : HTMLImageElement) -> Double

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/width

    HTMLImageElement::get_x

    fn HTMLImageElement::get_x(self : HTMLImageElement) -> Double

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/x

    HTMLImageElement::get_y

    fn HTMLImageElement::get_y(self : HTMLImageElement) -> Double

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/y

    HTMLImageElement::new

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/Image

    HTMLImageElement::new_with_size

    fn HTMLImageElement::new_with_size(width : Double, height : Double) -> HTMLImageElement

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/Image

    HTMLImageElement::set_alt

    fn HTMLImageElement::set_alt(self : HTMLImageElement, value : String) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt

    HTMLImageElement::set_cross_origin

    fn HTMLImageElement::set_cross_origin(self : HTMLImageElement, value : String) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/crossOrigin

    HTMLImageElement::set_decoding

    fn HTMLImageElement::set_decoding(self : HTMLImageElement, value : String) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/decoding

    HTMLImageElement::set_height

    fn HTMLImageElement::set_height(self : HTMLImageElement, value : Double) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/height

    HTMLImageElement::set_is_map

    fn HTMLImageElement::set_is_map(self : HTMLImageElement, value : Bool) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/isMap

    HTMLImageElement::set_loading

    fn HTMLImageElement::set_loading(self : HTMLImageElement, value : String) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/loading

    HTMLImageElement::set_natural_height

    fn HTMLImageElement::set_natural_height(self : HTMLImageElement, value : Double) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/naturalHeight

    HTMLImageElement::set_natural_width

    fn HTMLImageElement::set_natural_width(self : HTMLImageElement, value : Double) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/naturalWidth

    HTMLImageElement::set_referrer_policy

    fn HTMLImageElement::set_referrer_policy(self : HTMLImageElement, value : String) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/referrerPolicy

    HTMLImageElement::set_sizes

    fn HTMLImageElement::set_sizes(self : HTMLImageElement, value : String) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/sizes

    HTMLImageElement::set_src

    fn HTMLImageElement::set_src(self : HTMLImageElement, value : String) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/src

    HTMLImageElement::set_srcset

    fn HTMLImageElement::set_srcset(self : HTMLImageElement, value : String) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/srcset

    HTMLImageElement::set_use_map

    fn HTMLImageElement::set_use_map(self : HTMLImageElement, value : String) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/useMap

    HTMLImageElement::set_width

    fn HTMLImageElement::set_width(self : HTMLImageElement, value : Double) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/width

    HTMLInputElement

    type HTMLInputElement

    HTMLInputElement::set_value

    fn HTMLInputElement::set_value(self : HTMLInputElement, value : String) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/value

    HTMLInputElement::value

    fn HTMLInputElement::value(self : HTMLInputElement) -> String

    HTMLMediaElement

    type HTMLMediaElement

    HTMLSelectElement

    type HTMLSelectElement

    HTMLSelectElement::value

    fn HTMLSelectElement::value(self : HTMLSelectElement) -> String

    ImageBitmapRenderingContext

    type ImageBitmapRenderingContext

    ImageData

    type ImageData

    ImageData::get_color_space

    fn ImageData::get_color_space(self : ImageData) -> String

    ImageData::get_data

    fn ImageData::get_data(self : ImageData) -> Uint8ClampedArray

    ImageData::get_height

    fn ImageData::get_height(self : ImageData) -> Int

    ImageData::get_width

    fn ImageData::get_width(self : ImageData) -> Int

    ImageData::new

    ImageData::new_with_data

    ImageDataSettings

    type ImageDataSettings

    ImageDataSettings::new

    fn ImageDataSettings::new(color_space : String) -> ImageDataSettings

    InputEvent

    type InputEvent

    InputEvent::data

    fn InputEvent::data(self : InputEvent) -> String

    InputEvent::input_type

    fn InputEvent::input_type(self : InputEvent) -> String

    InputEvent::is_composing

    fn InputEvent::is_composing(self : InputEvent) -> Bool

    IntersectionObserver

    type IntersectionObserver

    https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver

    IntersectionObserver::disconnect

    fn IntersectionObserver::disconnect(self : IntersectionObserver) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/disconnect

    IntersectionObserver::new

    https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/IntersectionObserver

    IntersectionObserver::observe

    fn IntersectionObserver::observe(self : IntersectionObserver, target : Element) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/observe

    IntersectionObserver::unobserve

    fn IntersectionObserver::unobserve(self : IntersectionObserver, target : Element) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/unobserve

    IntersectionObserverEntry

    type IntersectionObserverEntry

    https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry

    KeyboardEvent

    type KeyboardEvent

    KeyboardEvent::alt_key

    fn KeyboardEvent::alt_key(self : KeyboardEvent) -> Bool

    KeyboardEvent::code

    fn KeyboardEvent::code(self : KeyboardEvent) -> String

    KeyboardEvent::ctrl_key

    fn KeyboardEvent::ctrl_key(self : KeyboardEvent) -> Bool

    KeyboardEvent::is_composing

    fn KeyboardEvent::is_composing(self : KeyboardEvent) -> Bool

    KeyboardEvent::key

    fn KeyboardEvent::key(self : KeyboardEvent) -> String

    KeyboardEvent::location

    fn KeyboardEvent::location(self : KeyboardEvent) -> Int

    KeyboardEvent::meta_key

    fn KeyboardEvent::meta_key(self : KeyboardEvent) -> Bool

    KeyboardEvent::repeat

    fn KeyboardEvent::repeat(self : KeyboardEvent) -> Bool

    KeyboardEvent::shift_key

    fn KeyboardEvent::shift_key(self : KeyboardEvent) -> Bool

    MediaError

    type MediaError

    MediaKeys

    type MediaKeys

    MediaQueryList

    type MediaQueryList

    https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList

    MediaQueryList::get_matches

    fn MediaQueryList::get_matches(self : MediaQueryList) -> Bool

    https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/matches

    MediaStream

    type MediaStream

    MessageEvent

    type MessageEvent

    https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent

    MessageEvent::get_data_string

    fn MessageEvent::get_data_string(self : MessageEvent) -> String?

    MutationObserver

    type MutationObserver

    https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver

    MutationObserver::disconnect

    fn MutationObserver::disconnect(self : MutationObserver) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver/disconnect

    MutationObserver::new

    https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver/MutationObserver

    MutationObserver::observe

    fn MutationObserver::observe(self : MutationObserver, target : Node, child_list? : Bool, attributes? : Bool, character_data? : Bool, subtree? : Bool, attribute_old_value? : Bool, character_data_old_value? : Bool, attribute_filter? : Array[String]) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver/observe

    MutationRecord

    type MutationRecord

    https://developer.mozilla.org/en-US/docs/Web/API/MutationRecord

    MutationRecord::get_attribute_name

    fn MutationRecord::get_attribute_name(self : MutationRecord) -> String?

    https://developer.mozilla.org/en-US/docs/Web/API/MutationRecord/attributeName
    #external
    pub type Navigator

    fn Navigator::clipboard(self : Navigator) -> Clipboard

    NodeList

    type NodeList

    https://developer.mozilla.org/en-US/docs/Web/API/NodeList

    NodeList::get_length

    fn NodeList::get_length(self : NodeList) -> Double

    https://developer.mozilla.org/en-US/docs/Web/API/NodeList/length

    NodeList::item

    https://developer.mozilla.org/en-US/docs/Web/API/NodeList/item

    OffscreenCanvas

    type OffscreenCanvas

    Performance

    type Performance

    https://developer.mozilla.org/en-US/docs/Web/API/Performance

    Performance::now

    fn Performance::now(self : Performance) -> Double

    https://developer.mozilla.org/en-US/docs/Web/API/Performance/now

    PointerEvent

    type PointerEvent

    https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent

    PointerEvent::get_altitude_angle

    fn PointerEvent::get_altitude_angle(self : PointerEvent) -> Double

    https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/altitudeAngle

    PointerEvent::get_azimuth_angle

    fn PointerEvent::get_azimuth_angle(self : PointerEvent) -> Double

    https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/azimuthAngle

    PointerEvent::get_height

    fn PointerEvent::get_height(self : PointerEvent) -> Double

    https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/height

    PointerEvent::get_is_primary

    fn PointerEvent::get_is_primary(self : PointerEvent) -> Bool

    https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/isPrimary

    PointerEvent::get_pointer_id

    fn PointerEvent::get_pointer_id(self : PointerEvent) -> Int

    https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerId

    PointerEvent::get_pointer_type

    fn PointerEvent::get_pointer_type(self : PointerEvent) -> String

    https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerType

    PointerEvent::get_pressure

    fn PointerEvent::get_pressure(self : PointerEvent) -> Double

    https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pressure

    PointerEvent::get_tangential_pressure

    fn PointerEvent::get_tangential_pressure(self : PointerEvent) -> Double

    https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tangentialPressure

    PointerEvent::get_tilt_x

    fn PointerEvent::get_tilt_x(self : PointerEvent) -> Int

    https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltX

    PointerEvent::get_tilt_y

    fn PointerEvent::get_tilt_y(self : PointerEvent) -> Int

    https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltY

    PointerEvent::get_twist

    fn PointerEvent::get_twist(self : PointerEvent) -> Int

    https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/twist

    PointerEvent::get_width

    fn PointerEvent::get_width(self : PointerEvent) -> Double

    https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/width

    RemotePlayback

    type RemotePlayback

    ResizeObserver

    type ResizeObserver

    https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver

    ResizeObserver::disconnect

    fn ResizeObserver::disconnect(self : ResizeObserver) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/disconnect

    ResizeObserver::new

    https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver

    ResizeObserver::observe

    fn ResizeObserver::observe(self : ResizeObserver, target : Element) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/observe

    ResizeObserver::unobserve

    fn ResizeObserver::unobserve(self : ResizeObserver, target : Element) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/unobserve

    ResizeObserverEntry

    type ResizeObserverEntry

    https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry

    SVGAnimatedTransformList

    type SVGAnimatedTransformList

    SVGElement

    type SVGElement

    https://developer.mozilla.org/en-US/docs/Web/API/SVGElement

    SVGGraphicsElement

    type SVGGraphicsElement

    SVGStringList

    type SVGStringList

    StylePropertyMap

    type StylePropertyMap

    Text

    type Text

    impl IsNode for Text

    Text::to_node

    fn Text::to_node(self : Text) -> Node

    TextTrack

    type TextTrack

    TextTrackList

    type TextTrackList

    TimeRanges

    type TimeRanges

    ToggleEvent

    type ToggleEvent

    https://developer.mozilla.org/en-US/docs/Web/API/ToggleEvent

    ToggleEvent::get_new_state

    fn ToggleEvent::get_new_state(self : ToggleEvent) -> String

    https://developer.mozilla.org/en-US/docs/Web/API/ToggleEvent/newState

    ToggleEvent::get_old_state

    fn ToggleEvent::get_old_state(self : ToggleEvent) -> String

    https://developer.mozilla.org/en-US/docs/Web/API/ToggleEvent/oldState

    TransitionEvent

    type TransitionEvent

    https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent

    TransitionEvent::get_elapsed_time

    fn TransitionEvent::get_elapsed_time(self : TransitionEvent) -> Double

    https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent/elapsedTime

    TransitionEvent::get_property_name

    fn TransitionEvent::get_property_name(self : TransitionEvent) -> String

    https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent/propertyName

    TransitionEvent::get_pseudo_element

    fn TransitionEvent::get_pseudo_element(self : TransitionEvent) -> String

    https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent/pseudoElement

    Uint8ClampedArray

    type Uint8ClampedArray

    VideoFrame

    type VideoFrame

    VideoTrackList

    type VideoTrackList

    VisualViewport

    type VisualViewport

    https://developer.mozilla.org/en-US/docs/Web/API/VisualViewport

    VisualViewport::get_height

    fn VisualViewport::get_height(self : VisualViewport) -> Double

    https://developer.mozilla.org/en-US/docs/Web/API/VisualViewport/height

    VisualViewport::get_offset_left

    fn VisualViewport::get_offset_left(self : VisualViewport) -> Double

    https://developer.mozilla.org/en-US/docs/Web/API/VisualViewport/offsetLeft

    VisualViewport::get_offset_top

    fn VisualViewport::get_offset_top(self : VisualViewport) -> Double

    https://developer.mozilla.org/en-US/docs/Web/API/VisualViewport/offsetTop

    VisualViewport::get_width

    fn VisualViewport::get_width(self : VisualViewport) -> Double

    https://developer.mozilla.org/en-US/docs/Web/API/VisualViewport/width

    WebGL2RenderingContext

    type WebGL2RenderingContext

    WebGLRenderingContext

    type WebGLRenderingContext

    WebSocket

    type WebSocket

    https://developer.mozilla.org/en-US/docs/Web/API/WebSocket

    WebSocket::close

    fn WebSocket::close(self : WebSocket) -> Unit

    WebSocket::close_quietly

    fn WebSocket::close_quietly(self : WebSocket) -> Unit

    WebSocket::close_safe

    fn WebSocket::close_safe(self : WebSocket, code? : Int, reason? : String) -> Result[Unit, String]

    WebSocket::close_with_code_reason

    fn WebSocket::close_with_code_reason(self : WebSocket, code : Int, reason : String) -> Unit

    WebSocket::get_buffered_amount

    fn WebSocket::get_buffered_amount(self : WebSocket) -> Int

    WebSocket::get_protocol

    fn WebSocket::get_protocol(self : WebSocket) -> String

    WebSocket::get_ready_state

    fn WebSocket::get_ready_state(self : WebSocket) -> Int

    WebSocket::get_url

    fn WebSocket::get_url(self : WebSocket) -> String

    WebSocket::new

    fn WebSocket::new(url : String) -> WebSocket

    WebSocket::new_with_protocols

    fn WebSocket::new_with_protocols(url : String, protocols : Array[String]) -> WebSocket

    WebSocket::open

    fn WebSocket::open(url : String, protocols? : Array[String]) -> Result[WebSocket, String]

    WebSocket::send

    fn WebSocket::send(self : WebSocket, data : String) -> Unit

    WebSocket::send_safe

    fn WebSocket::send_safe(self : WebSocket, data : String) -> Result[Unit, String]

    WheelEvent

    type WheelEvent

    WheelEvent::get_delta_mode

    fn WheelEvent::get_delta_mode(self : WheelEvent) -> Int

    WheelEvent::get_delta_x

    fn WheelEvent::get_delta_x(self : WheelEvent) -> Double

    WheelEvent::get_delta_y

    fn WheelEvent::get_delta_y(self : WheelEvent) -> Double

    WheelEvent::get_delta_z

    fn WheelEvent::get_delta_z(self : WheelEvent) -> Double

    Window

    type Window

    Window::alert

    fn Window::alert(self : Window, msg : String) -> Unit

    Window::cancel_animation_frame

    fn Window::cancel_animation_frame(self : Window, request_id : Double) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/Window/cancelAnimationFrame

    Window::clear_interval

    fn Window::clear_interval(self : Window, interval_id : Int) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/Window/clearInterval

    Window::clear_timeout

    fn Window::clear_timeout(self : Window, timeout_id : Int) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/Window/clearTimeout

    Window::confirm

    fn Window::confirm(self : Window, msg : String) -> Bool

    Window::current_url

    fn Window::current_url(self : Window) -> String

    Window::get_computed_style

    fn Window::get_computed_style(self : Window, element : Element) -> CSSStyleDeclaration

    Returns the resolved CSS values for an element. https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle

    Window::get_performance

    fn Window::get_performance(self : Window) -> Performance

    https://developer.mozilla.org/en-US/docs/Web/API/Window/performance

    Window::get_visual_viewport

    fn Window::get_visual_viewport(self : Window) -> VisualViewport?

    https://developer.mozilla.org/en-US/docs/Web/API/Window/visualViewport

    Window::history_go_back

    fn Window::history_go_back(self : Window) -> Unit

    Window::history_go_forward

    fn Window::history_go_forward(self : Window) -> Unit

    Window::inner_height

    fn Window::inner_height(self : Window) -> Int

    Window::inner_width

    fn Window::inner_width(self : Window) -> Int

    Window::load_url

    fn Window::load_url(self : Window, url : String) -> Unit

    Window::match_media

    fn Window::match_media(self : Window, query : String) -> MediaQueryList

    https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia

    Window::navigator

    fn Window::navigator(self : Window) -> Navigator

    Window::origin

    fn Window::origin(self : Window) -> String

    Window::push_url

    fn Window::push_url(self : Window, url : String) -> Unit

    Window::queue_microtask

    fn Window::queue_microtask(self : Window, f : () -> Unit) -> Unit

    https://developer.mozilla.org/en-US/docs/Web/API/Window/queueMicrotask

    Window::reload_url

    fn Window::reload_url(self : Window) -> Unit

    Window::replace_url

    fn Window::replace_url(self : Window, url : String) -> Unit

    Window::request_animation_frame

    fn Window::request_animation_frame(self : Window, f : (Double) -> Unit) -> Double

    https://developer.mozilla.org/en-US/docs/Web/API/Window/requestAnimationFrame

    Window::scroll_by

    fn Window::scroll_by(self : Window, x : Int, y : Int, behavior? : String) -> Unit

    Window::scroll_to

    fn Window::scroll_to(self : Window, x : Int, y : Int, behavior? : String) -> Unit

    Window::scroll_to_bottom

    fn Window::scroll_to_bottom(self : Window, behavior? : String) -> Unit

    Window::scroll_to_top

    fn Window::scroll_to_top(self : Window, behavior? : String) -> Unit

    Window::scroll_x

    fn Window::scroll_x(self : Window) -> Int

    Window::scroll_y

    fn Window::scroll_y(self : Window) -> Int

    Window::set_interval

    fn Window::set_interval(self : Window, f : () -> Unit, ms : Int) -> Int

    https://developer.mozilla.org/en-US/docs/Web/API/Window/setInterval

    Window::set_timeout

    fn Window::set_timeout(self : Window, f : () -> Unit, ms : Int) -> Int

    https://developer.mozilla.org/en-US/docs/Web/API/Window/setTimeout

    Window::to_event_target

    fn Window::to_event_target(self : Window) -> EventTarget

    DOM_KEY_LOCATION_LEFT

    let DOM_KEY_LOCATION_LEFT : Int

    DOM_KEY_LOCATION_NUMPAD

    let DOM_KEY_LOCATION_NUMPAD : Int

    DOM_KEY_LOCATION_RIGHT

    let DOM_KEY_LOCATION_RIGHT : Int

    DOM_KEY_LOCATION_STANDARD

    let DOM_KEY_LOCATION_STANDARD : Int

    default_exception_handler

    fn[E, R] default_exception_handler(exception : E) -> R

    DO NOT USE THIS FUNCTION. NOTE: There is a bug in the unused analyzer, so make this function public to avoid the warning.

    document

    fn document() -> Document

    namespace_html

    let namespace_html : String

    namespace_mathml

    let namespace_mathml : String

    namespace_svg

    let namespace_svg : String

    window

    fn window() -> Window