mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-16 16:12:53 +00:00
LibWeb: Add IDL definition for SVGScriptElement
It does not currently handle any of the actual scripting, but this should at least allow us to create an instance of the element. The test being added here isn't actually testing much, but before the previous commit we used to crash parsing the page due to a TODO().
This commit is contained in:
parent
60c32f39a1
commit
07b332e17c
Notes:
sideshowbarker
2024-07-17 06:54:15 +09:00
Author: https://github.com/shannonbooth
Commit: 07b332e17c
Pull-request: https://github.com/SerenityOS/serenity/pull/21197
9 changed files with 78 additions and 0 deletions
22
Userland/Libraries/LibWeb/SVG/SVGScriptElement.cpp
Normal file
22
Userland/Libraries/LibWeb/SVG/SVGScriptElement.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Shannon Booth <shannon@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/SVG/SVGScriptElement.h>
|
||||
|
||||
namespace Web::SVG {
|
||||
|
||||
SVGScriptElement::SVGScriptElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: SVGElement(document, move(qualified_name))
|
||||
{
|
||||
}
|
||||
|
||||
void SVGScriptElement::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGScriptElementPrototype>(realm, "SVGScriptElement"));
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue