mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:37:35 +00:00
LibWeb: Make WindowObject's prototype immutable
While I was implementing IDL special operations, I noticed that for global platform objects (e.g. WindowObject), the IDL spec makes their prototype immutable. https://heycam.github.io/webidl/#platform-object-setprototypeof
This commit is contained in:
parent
f6b24a72ee
commit
e0e41116a4
2 changed files with 9 additions and 0 deletions
|
@ -136,6 +136,13 @@ Origin WindowObject::origin() const
|
|||
return impl().associated_document().origin();
|
||||
}
|
||||
|
||||
// https://heycam.github.io/webidl/#platform-object-setprototypeof
|
||||
bool WindowObject::internal_set_prototype_of(JS::Object* prototype)
|
||||
{
|
||||
// 1. Return ? SetImmutablePrototype(O, V).
|
||||
return set_immutable_prototype(prototype);
|
||||
}
|
||||
|
||||
static DOM::Window* impl_from(JS::VM& vm, JS::GlobalObject& global_object)
|
||||
{
|
||||
// Since this is a non built-in function we must treat it as non-strict mode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue