-
-
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
Unroll argument conversion loop (for non-... args) #5
Comments
I guess this is kinda related to #4. I'm still hanging on to that thought of ensuring arguments.length equivalence for impl classes. |
I am pretty sure impl classes should not rely on arguments.length though. I don't think WebIDL even allows that checking. It is all handled in the WebIDL layer. |
In order to fix the dictionary thing, |
I notice this kind of happened but there's a tryImplForWrapper loop above the unrolled conversions now. I think we should be able to apply tryImplForWrapper only to (known?) interface types. |
Not right, now, since we never know about all the interface types. Take Node.dispatchEvent for example. We don't actually know about the Event type there (in jsdom, due to our folder structure at least, since we convert all folders seperately). I plan to update the conversion interface to include more state so you can add multiple folders to the same conversion process, so we'd know about the whole interface system, but haven't gotten to it yet. |
An update: since about three months ago (in #33) we no longer try to get the impl if the type is known not to be an interface (sequences, records, promises, primitives). There is still the major pain point that we don't yet have a way to import types from other modules. E.g. the URL interface is implemented in whatwg-url using webidl2js, but the webidl2js in jsdom doesn't know URL is an interface, and even though it still tries unwrapping it doesn't work because the impl symbol is different for interfaces in another module. I've got a fix in the works, but will have to change up the type system a bit here so that it doesn't assume the impl symbol is the same for all interfaces. I'll also have to think of a solution for hybrids like Window, in that it functions like a generated class and has impl property (because it inherits EventTarget), but is not actually generated. |
could become
This also helps with #4 since it automatically fills out
args[2]
withundefined
if it wasn't passed.The text was updated successfully, but these errors were encountered: