mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:47:45 +00:00
LibWeb: Implement window.event as a [Replaceable] property
This is the result of debugging React DOM, which would throw a TypeError
when assigning to window.event in strict mode and then not complete
rendering - here:
cae6350/packages/shared/invokeGuardedCallbackImpl.js (L134)
With this change, the following minimal React example now works!
<div id="app"></div>
<script src="react.development.js"></script>
<script src="react-dom.development.js"></script>
<script>
ReactDOM.render(
React.createElement("h1", null, "Hello World"),
document.getElementById("app")
);
</script>
This commit is contained in:
parent
a05c998e69
commit
7991077284
2 changed files with 8 additions and 1 deletions
|
@ -68,6 +68,7 @@ private:
|
|||
JS_DECLARE_NATIVE_FUNCTION(screen_getter);
|
||||
|
||||
JS_DECLARE_NATIVE_FUNCTION(event_getter);
|
||||
JS_DECLARE_NATIVE_FUNCTION(event_setter);
|
||||
|
||||
JS_DECLARE_NATIVE_FUNCTION(inner_width_getter);
|
||||
JS_DECLARE_NATIVE_FUNCTION(inner_height_getter);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue