/* * Copyright (c) 2024, Jelle Raaijmakers * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include namespace Web::HTML { template class HTMLOrSVGElement { public: [[nodiscard]] GC::Ref dataset(); // https://html.spec.whatwg.org/#dom-noncedelement-nonce String const& nonce() { return m_cryptographic_nonce; } void set_nonce(String const& nonce) { m_cryptographic_nonce = nonce; } void focus(); void blur(); protected: void attribute_changed(FlyString const&, Optional const&, Optional const&, Optional const&); WebIDL::ExceptionOr cloned(DOM::Node&, bool); void inserted(); void visit_edges(JS::Cell::Visitor&); // https://html.spec.whatwg.org/multipage/dom.html#dom-dataset-dev GC::Ptr m_dataset; // https://html.spec.whatwg.org/#cryptographicnonce String m_cryptographic_nonce; // https://html.spec.whatwg.org/multipage/interaction.html#locked-for-focus bool m_locked_for_focus { false }; }; }