domenic / get-originals

A web platform API that allows access to the "original" versions of the global built-in objects' properties and methods
28 stars 1 forks source link

Originals through built-in modules #19

Closed littledan closed 5 years ago

littledan commented 5 years ago

I've heard suggestions from @lukewagner and @mattijs that we could provide access to a separate, frozen copy of built-ins through modules. Has anyone written up this idea? Should we develop it further in this repo or another one?

ljharb commented 5 years ago

I think we'd still need a way for polyfills/shims to, in advance of that access and of the freezing, add in missing behavior, repair/replace broken behavior, and deny access to undesired things (annex b, high-resolution timers, etc).

littledan commented 5 years ago

Agreed that we need some kinds of virtualization. I see this as working best with import-maps, which could enable these changes regardless of whether the approach in this repo or this issue are taken. Do you see any holes with that approach?

ljharb commented 5 years ago

If non-syntax things are always deniable/replaceable/patchable/virtualizable via import maps, that does seem like it might work.

littledan commented 5 years ago

@ljharb Does the current import-maps proposal meet this requirement for you?

ljharb commented 5 years ago

I think so - it remains to be seen how it will interact with this proposal.

mattijs commented 5 years ago

I have not incorporated the idea as part of the standard library proposal, but I intend to.

lukewagner commented 5 years ago

:100: :heart: