mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-07 20:31:04 +03: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:
parent
378fa09a5a
commit
6783a524d0
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());
|
||||
|
Loading…
Reference in New Issue
Block a user