summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp')
-rw-r--r--Userland/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp b/Userland/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp
index 2cd040f43f..ae90f88fee 100644
--- a/Userland/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp
+++ b/Userland/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp
@@ -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@"));
)~~~");