mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:37:35 +00:00
LibJS: Pass Realm to define_native_{accessor,function}()
This is needed so that the allocated NativeFunction receives the correct realm, usually forwarded from the Object's initialize() function, rather than using the current realm.
This commit is contained in:
parent
7c468b5a77
commit
e3895e6c80
116 changed files with 893 additions and 890 deletions
|
@ -22,8 +22,8 @@ void CSSNamespace::initialize(JS::Realm& realm)
|
|||
{
|
||||
Object::initialize(realm);
|
||||
u8 attr = JS::Attribute::Enumerable;
|
||||
define_native_function("escape", escape, 1, attr);
|
||||
define_native_function("supports", supports, 2, attr);
|
||||
define_native_function(realm, "escape", escape, 1, attr);
|
||||
define_native_function(realm, "supports", supports, 2, attr);
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/cssom-1/#dom-css-escape
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue