mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Make DOMExceptionPrototype's prototype %Error.prototype%
As mandated in the WebIDL spec: https://webidl.spec.whatwg.org/#js-DOMException-specialness
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 08:45:34 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/6783a524d0 Pull-request: https://github.com/SerenityOS/serenity/pull/23650 Reviewed-by: https://github.com/trflynn89 ✅
@@ -2741,7 +2741,14 @@ void @class_name@::initialize(JS::Realm& realm)
|
||||
|
||||
)~~~");
|
||||
|
||||
if (interface.prototype_base_class == "ObjectPrototype") {
|
||||
if (interface.name == "DOMException"sv) {
|
||||
generator.append(R"~~~(
|
||||
|
||||
set_prototype(realm.intrinsics().error_prototype());
|
||||
)~~~");
|
||||
}
|
||||
|
||||
else if (interface.prototype_base_class == "ObjectPrototype") {
|
||||
generator.append(R"~~~(
|
||||
|
||||
set_prototype(realm.intrinsics().object_prototype());
|
||||
|
||||
Reference in New Issue
Block a user