Comments (5)
We could also setup a bare bones synthetic environment. Not sure what I'd prefer.
@syg @ljharb did you all think about this at some point perhaps?
from infra.
IndexedDB does "a user agent-defined Realm", albeit with structured clone which is a bit different since it takes a realm argument instead of using the ambient current realm: https://w3c.github.io/IndexedDB/#add-or-put
I think we can do the same thing; just push a user agent defined realm on the stack, and pop it at the end.
from infra.
If we did want to refactor to not have any realm dependency, we could basically pull out steps 4-5 of https://tc39.es/ecma262/#sec-json.parse , and then crawl the ParseNode tree instead of our current strategy of crawling the object tree. I have a lot less experience working with ParseNodes in specs, but it's at least conceivable that this is about the same amount of work as what we currently do?
from infra.
@annevk tbh i have absolutely no idea what "infra" is and why there would ever not be a Realm when JS is executing.
from infra.
For some callers another problem here is that this algorithm can throw, but I think some callers also depend on that. So maybe that requires its own wrapper.
from infra.
Related Issues (20)
- Expand on list indexing syntax
- Conditional abort edge case HOT 2
- Forgiving base64 HOT 8
- "do while" loops HOT 5
- Iteration and append methods for byte sequence used in standards are undefined HOT 1
- Skipping an item while iterating is undefined HOT 1
- Define monkeypatching HOT 3
- Consider defining "unique internal value"
- Explicit unions HOT 1
- definitions of "Continue" and "Break" should be clear that they apply to the innermost loop
- Define ordering for sets and maps? HOT 4
- Define remainder (and/or modulo) HOT 2
- Peek operation for stacks
- Define set difference
- Give some examples of how to use structs
- Add a clone method for struct
- tracking/icon for features that might expose use of accessibility tools HOT 4
- Ordered set insert requires duplicate checks HOT 4
- Equality of structs/tuples is undefined HOT 2
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 infra.