-
Notifications
You must be signed in to change notification settings - Fork 24
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
NodeFilter constants are missing #252
Comments
Ah it looks like these are callbacks with actual interfaces (seems like there's a total of 3 such Generating an appropriate interface for this might be tricky. Naively, we can generate an extension type on extension type NodeFilter._(JSFunction _) implements JSFunction {
external static int get SHOW_ALL;
...
} But then because it's no longer a typedef, users who want to use APIs that accept a |
it looks like the spec identifies Also from my limited understanding, these are interfaces that contain EXACTLY ONE function, and any number of constants e.g.
from a first glance, they are very similar to dart's callable classes so they are technically just interfaces, meaning they can be defined as extension type NodeFilter._(JSObject _) implements JSObject {
external static int get SHOW_ALL;
//...
external static int acceptNode(Node node);
// this line is optional
int call(Node node) => acceptNode(node);
} |
The following constants are missing from
NodeFilter
: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker/whatToShownote that NodeFilter is defined as
JSFunction
so I am not sure how these constants would be mapped.The text was updated successfully, but these errors were encountered: