Skip to content

Commit

Permalink
fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Nov 18, 2024
1 parent 5cd2278 commit 36fa610
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ Since then the following conclusions have been made:

1. By unifying on the existing module record, which represents a source and a canonical instance pair
together, we are able to fully support dynamic import across realms. Module source objects that are
accessed in the "wrong realm" are effectively unusable and will throw, since module sources must
go through an explicit transfer for these behaviours to work out.
accessed in the "wrong realm" are effectively unusable and will throw, since module sources should
go through an explicit clone for these behaviours to work out. Future relaxations would be possible
although should be considered to be compatible with compartment linking models.
2. While there exist future refactorings for compiled module records, these would actually lead to an
increase in complexity of the cross-specification semantics currently, without also supporting a
more general module keying primtive. The current specifications structures are actually very
Expand Down Expand Up @@ -149,8 +150,6 @@ const workerModule = await import.source('./worker.js');
new Worker(workerModule);
```
## Design
The current proposed API is for a `ModuleSource` class instance extending `AbstractModuleSource`.
### Dynamic Import
Expand All @@ -167,7 +166,7 @@ to completion.
### Worker Invocation
The expectation for the HTML integration is that `new Worker(module)` or any concrete instance of
`AbstractModuleSource` would behave as if the module was first transferred into the worker and then
`AbstractModuleSource` would behave as if the module was first cloned into the worker and then
imported with dynamic `import()`.
An additional goal here would be for the created worker to inherit the same resolution rules of
Expand Down

0 comments on commit 36fa610

Please sign in to comment.