-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Handling dependencies not specified in the IDL #81
Comments
With |
@TimothyGu what happens to the output? Do we have tests? Do they use e.g. |
In @danyao's case I assume they add all the IDL fragments into webidl2js even for the interfaces not implemented with webidl2js. If only the IDL interfaces that are to be implemented with webidl2js are added to the transformer (as is the case for jsdom), we currently try to convert it by checking if the given object has our impl symbol, and if so unwrap the value using that symbol.
No, because our tests don't have |
Our IDLs looked like this: interface PaymentRequestUpdateEvent : Event {
void updateWith(Promise<PaymentDetailsUpdate> detailsPromise);
};
const Event = require("./Event.js");
...
Object.setPrototypeOf(PaymentRequestUpdateEvent.prototype, Event.interface.prototype); This results in two errors:
|
Solving this would be helpful for the Streams Standard reference implementation, which runs its own webidl2js-generated code inside a jsdom environment, and would like to use that jsdom environment's |
I'm using webidl2js to generate JavaScript interfaces for web API polyfills. My IDL may depend on other interfaces that are already natively supported in a browser. webidl2js seems to expect to be part of a complete system generating all dependent interfaces from scratch. So it generate
require
statements for these dependent interfaces as well.Manually removing the
require
statements from the generate JS is not a full solution because there are accesses to<DependentType>.interface.prototype
and built-in types don't have theinterface
field.Perhaps webidl2js could assume any interfaces not specified in the IDL directory are provided already?
The text was updated successfully, but these errors were encountered: