Luce packages
LuceLuce BaseLuciaOS

dymokomi/luce-browser-engine

Source of release 0.6.0

0.6.0 / src / web / html / html_head_element.lucb

#==============================================================================================
#
#   html_head_element - HTML::HTMLHeadElement: <head>
#
#   DESCRIPTION:
#       Port of LibWeb/HTML/HTMLHeadElement.cpp (lines 1-28) and the is_html_head_element inline
#       of HTMLHeadElement.h: construction (which moves the mixin tables to HTMLHeadElement's, as
#       C++'s vptrs move) and initialize.
#
#==============================================================================================

## Ported from HTMLHeadElement.cpp:15 Web::HTML::HTMLHeadElement::HTMLHeadElement.
pub func html_head_element_construct(this: HtmlHeadElement*, document: DomDocument*, qualified_name: DomQualifiedName):
    html_element_construct(this.html_element(), document, qualified_name)
    # The vptrs of the mixin bases move to HTMLHeadElement's tables.
    let element = this.html_element()
    element.element.slottable_mixin.vtable = &html_head_element_slottable_mixin_vtable
    element.element.aria_mixin.vtable = &html_head_element_aria_mixin_vtable
    element.element.animatable.vtable = &html_head_element_animatable_vtable
    element.global_event_handlers.vtable = &html_head_element_global_event_handlers_vtable
    element.form_associated_element.vtable = &html_head_element_form_associated_element_vtable

## Ported from HTMLHeadElement.cpp:22 Web::HTML::HTMLHeadElement::initialize (override).
pub func html_head_element_initialize_impl(base: JsCell*, realm: Realm*):
    web_set_prototype_for_interface(base, realm, BindInterfaceName.html_head_element)
    html_element_initialize_impl(base, realm)

## Ported from HTMLHeadElement.h:23 Web::HTML::HTMLHeadElement::is_html_head_element (override).
pub func html_head_element_is_html_head_element_impl(base: DomNode*) -> bool:
    return true