mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:48:14 +00:00
LibWeb: Add DOM::DOMException class and bindings
This commit is contained in:
parent
cc0f5917d3
commit
ada71dc71b
6 changed files with 207 additions and 1 deletions
|
@ -1153,7 +1153,13 @@ namespace Web::Bindings {
|
|||
{
|
||||
)~~~");
|
||||
|
||||
if (!interface.parent_name.is_empty()) {
|
||||
if (interface.name == "DOMException") {
|
||||
// https://heycam.github.io/webidl/#es-DOMException-specialness
|
||||
// Object.getPrototypeOf(DOMException.prototype) === Error.prototype
|
||||
generator.append(R"~~~(
|
||||
set_prototype(global_object.error_prototype());
|
||||
)~~~");
|
||||
} else if (!interface.parent_name.is_empty()) {
|
||||
generator.append(R"~~~(
|
||||
set_prototype(&static_cast<WindowObject&>(global_object).ensure_web_prototype<@prototype_base_class@>("@parent_name@"));
|
||||
)~~~");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue