es6-shim icon indicating copy to clipboard operation
es6-shim copied to clipboard

Revise ES6 Construct (Promise,Map,Set) to follow latest spec

Open ljharb opened this issue 10 years ago • 5 comments

https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js#L161-L174 no longer applies, since as of Rev 28 @@create no longer exist.

Should we thus remove this function?

ljharb avatar Nov 18 '14 18:11 ljharb

Subclassing is still supported though.

domenic avatar Nov 18 '14 18:11 domenic

Definitely - how can we shim the act of calling the [[CreateAction]] internal slot?

ljharb avatar Nov 18 '14 19:11 ljharb

Yeah, it needs to stay there until I revise the Promise implementation to follow the latest spec. Our @@create methods were used to ensure that Map and Set etc also support subclassing; we need to come up with a unified solution for that. Probably with a hidden field named literally [[CreateAction]] or something like that.

In the meantime, I think having the correct externally-visible operation (as we do now) is more important than whether our implementation follows the naming of spec-internal methods. Unless someone can point to a concrete externally-visible ES6 behavior that we are misbehaving on?

cscott avatar Nov 18 '14 19:11 cscott

Relates to #239.

ljharb avatar Nov 18 '14 21:11 ljharb

@cscott any update on this one?

ljharb avatar Jan 05 '15 07:01 ljharb