mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +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
|
@ -98,6 +98,7 @@
|
|||
#include <LibWeb/SVG/SVGRadialGradientElement.h>
|
||||
#include <LibWeb/SVG/SVGRectElement.h>
|
||||
#include <LibWeb/SVG/SVGSVGElement.h>
|
||||
#include <LibWeb/SVG/SVGScriptElement.h>
|
||||
#include <LibWeb/SVG/SVGStopElement.h>
|
||||
#include <LibWeb/SVG/SVGStyleElement.h>
|
||||
#include <LibWeb/SVG/SVGSymbolElement.h>
|
||||
|
@ -472,6 +473,8 @@ static JS::GCPtr<SVG::SVGElement> create_svg_element(JS::Realm& realm, Document&
|
|||
return realm.heap().allocate<SVG::SVGTSpanElement>(realm, document, move(qualified_name));
|
||||
if (local_name == SVG::TagNames::use)
|
||||
return realm.heap().allocate<SVG::SVGUseElement>(realm, document, move(qualified_name));
|
||||
if (local_name == SVG::TagNames::script)
|
||||
return realm.heap().allocate<SVG::SVGScriptElement>(realm, document, move(qualified_name));
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue