Comments (2)
Object.getOwnPropertyDescriptor(window, 'chrome')
{value: {…}, writable: true, enumerable: true, configurable: false}
This is not problematic because even though it is non-configurable, it is writable, therefore we can replace the value
with undefined
(in the case of SES), or with a Proxy
in the case of our use-case.
from near-membrane.
The issue I raised is a little different, and it's due to the fact that window.chrome
can't be removed, which means that:
typeof chrome === 'undefined'
fails- an accidental global can't be detected with a
ReferenceError
.
In addition, this global is unspecified API, and it's pure luck that it can be nullified. This is a great canari alerting to a problem...
The language specs should include an invariant to at least maintain status quo on the current non-configurable objects (better, make them configurable), but more importantly prevent other objects to appear as non-configurable or non-writable!
from near-membrane.
Related Issues (20)
- Enable async/await tests for Firefox and Safari HOT 1
- add AggregateError to the intrinsics list HOT 1
- Implement workaround for FF bug 543435: window.document instance replacement for blank pages HOT 1
- add yarn bundlesize
- Passing the red `Proxy` to a blue function HOT 1
- Code Coverage Instrumentation Failed At redEnvFactory HOT 2
- Question: Is it possible to use Child Realm in browser without access to browser-specific API? HOT 2
- [Question] What does VirtualEnvironment.link do? HOT 1
- Not work with exotic object HOT 4
- feature request: improve debug experience by set-up a private field on the proxy when possible HOT 3
- Errors and sourcemaps inside Virtualenvironment HOT 1
- Question about `liveTargetCallback` HOT 1
- Question: `eval` vs `Function(code)()` HOT 2
- error in happy-dom
- Distortions for window do not get wired
- [browsers] Impossible to observe unhandled rejection from within a sandbox HOT 2
- Methods that check internal slots will have problems with proxy wrapped values
- remap AsyncFunction constructor and friends. HOT 1
- document.all seems leaked directly to the iframe HOT 2
- EventTarget is missing in sandbox on Chrome
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from near-membrane.