mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:17:35 +00:00
LibWeb: Generate MathML Elements
We will now generate MathML elements when parsing HTML.
This commit is contained in:
parent
52d6df5ee5
commit
442602bec8
8 changed files with 123 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <LibWeb/Bindings/ExceptionOrUtils.h>
|
||||
#include <LibWeb/MathML/MathMLElement.h>
|
||||
#include <LibWeb/MathML/TagNames.h>
|
||||
|
||||
namespace Web::MathML {
|
||||
|
||||
|
@ -24,4 +25,12 @@ void MathMLElement::initialize(JS::Realm& realm)
|
|||
m_dataset = MUST(HTML::DOMStringMap::create(*this));
|
||||
}
|
||||
|
||||
Optional<ARIA::Role> MathMLElement::default_role() const
|
||||
{
|
||||
// https://www.w3.org/TR/html-aria/#el-math
|
||||
if (local_name() == TagNames::math.to_deprecated_fly_string())
|
||||
return ARIA::Role::math;
|
||||
return {};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue