Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Improve set-constant.js scriptlet
The scriptlet will now still try to trap a specific property if a segment of the chain is not undefined while yet not an object either. For example, this now allows to set a value on `document.body.onselectstart` when `document.body` has not been instantiated yet by the browser parser, whereas this would previously fail because `document.body` would be `null` while the scriptlet was testing against `undefined`.
- Loading branch information
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -1696,7 +1696,7 @@ set-constant.js application/javascript | ||
| var prop = chain.slice(0, pos), | ||
| v = owner[prop]; | ||
| chain = chain.slice(pos + 1); | ||
| if ( v instanceof Object ) { | ||
| makeProxy(v, chain); | ||
| return; | ||
| } | ||