mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00: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 ✅
1 changed files with 8 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue