jsdom / webidl2js

Auto-generate JS class structures for Web IDL specifications
MIT License
79 stars 30 forks source link

Factor out IDL-to-ECMAScript type conversion #71

Open TimothyGu opened 7 years ago

TimothyGu commented 7 years ago

We currently have an incomplete version of the actual algorithms:

https://github.com/jsdom/webidl2js/blob/bf9954ddc186e4d733957aba0bdcde35366fb548/lib/constructs/operation.js#L88-L98

Would be nice to factor it out, for e.g. callback function support.

qwtel commented 6 years ago

I've noticed that this section was not doing the right thing for Promise, sequence, and record, so I've made some changes: https://github.com/platformparity/webidl2js/compare/master...platformparity:genericwrap

I didn't factor it out though, nor am I aware that there's an actual algorithm defined somewhere (is this part of WebIDL?).