Serenity Operating System
at master 40 lines 1.2 kB view raw
1/* 2 * Copyright (c) 2020, the SerenityOS developers. 3 * 4 * SPDX-License-Identifier: BSD-2-Clause 5 */ 6 7#include <LibWeb/Bindings/Intrinsics.h> 8#include <LibWeb/HTML/HTMLTextAreaElement.h> 9 10namespace Web::HTML { 11 12HTMLTextAreaElement::HTMLTextAreaElement(DOM::Document& document, DOM::QualifiedName qualified_name) 13 : HTMLElement(document, move(qualified_name)) 14{ 15} 16 17HTMLTextAreaElement::~HTMLTextAreaElement() = default; 18 19JS::ThrowCompletionOr<void> HTMLTextAreaElement::initialize(JS::Realm& realm) 20{ 21 MUST_OR_THROW_OOM(Base::initialize(realm)); 22 set_prototype(&Bindings::ensure_web_prototype<Bindings::HTMLTextAreaElementPrototype>(realm, "HTMLTextAreaElement")); 23 24 return {}; 25} 26 27// https://html.spec.whatwg.org/multipage/interaction.html#dom-tabindex 28i32 HTMLTextAreaElement::default_tab_index_value() const 29{ 30 // See the base function for the spec comments. 31 return 0; 32} 33 34// https://html.spec.whatwg.org/multipage/form-elements.html#the-textarea-element:concept-form-reset-control 35void HTMLTextAreaElement::reset_algorithm() 36{ 37 // FIXME: The reset algorithm for textarea elements is to set the dirty value flag back to false, and set the raw value of element to its child text content. 38} 39 40}