Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factor out IDL-to-ECMAScript type conversion #71

Open
TimothyGu opened this issue Sep 16, 2017 · 1 comment
Open

Factor out IDL-to-ECMAScript type conversion #71

TimothyGu opened this issue Sep 16, 2017 · 1 comment

Comments

@TimothyGu
Copy link
Member

We currently have an incomplete version of the actual algorithms:

if (overloads.every(overload => conversions[overload.operation.idlType.idlType])) {
str += `
return ${callOn}.${implFunc}(${argsSpread});
};
`;
} else {
str += `
return utils.tryWrapperForImpl(${callOn}.${implFunc}(${argsSpread}));
};
`;
}

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

@qwtel
Copy link

qwtel commented Jun 11, 2018

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?).

stevedorries pushed a commit to stevedorries/webidl2js that referenced this issue Jan 27, 2020
TimothyGu added a commit to TimothyGu/webidl2js that referenced this issue Mar 25, 2020
Implemented JS-to-IDL type conversion but not:

- Saving callback context [1]
- Call a user object's operation [2]
- IDL-to-JS type conversion (jsdom#71)
- Legacy callback interface object [3]

Helps fix jsdom/jsdom#2869.

[1]: https://heycam.github.io/webidl/#dfn-callback-context
[2]: https://heycam.github.io/webidl/#call-a-user-objects-operation
[3]: https://heycam.github.io/webidl/#dfn-legacy-callback-interface-object
TimothyGu added a commit that referenced this issue Mar 26, 2020
Implemented JS-to-IDL type conversion but not:

- Saving callback context [1]
- Call a user object's operation [2]
- IDL-to-JS type conversion (#71)
- Legacy callback interface object [3]

Fixes jsdom/jsdom#2869.

[1]: https://heycam.github.io/webidl/#dfn-callback-context
[2]: https://heycam.github.io/webidl/#call-a-user-objects-operation
[3]: https://heycam.github.io/webidl/#dfn-legacy-callback-interface-object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants