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

Question on WebIDL #37710

Closed
brettz9 opened this issue Dec 30, 2022 · 2 comments
Closed

Question on WebIDL #37710

brettz9 opened this issue Dec 30, 2022 · 2 comments

Comments

@brettz9
Copy link
Contributor

brettz9 commented Dec 30, 2022

Hi,

In https://webidl.spec.whatwg.org/ , while I see reference to specific prescribed class strings on interface prototypes, I don't see any prescribed behavior for class strings on objects which implement an interface.

Do you know if that is up to the spec to specify in some manner? I'm specifically wondering whether CryptoKey objects, by their WebIDL implies a specific class string (presumably "CryptoKey", if so).

If this is not implied in WebIDL, why is it not (as it should be useful to have such a consistent means available for detection in userland)? Should it not at least be encouraged somewhere for objects implementing an interface to define them?

I asked this at https://stackoverflow.com/questions/74950202/webidl-object-class-strings , but received no reply, so wondering if you might be able to address here given your WebIDL tests.

Thanks!

@rakuco
Copy link
Member

rakuco commented Jan 23, 2023

I think the short answer is that since these are platform objects whose prototype is the interface prototype object, they also get the prescribed behavior for class strings by default.

Note that this is a question better suited for Web IDL's own issue tracker, where you will probably get a more detailed anwswer.

@brettz9
Copy link
Contributor Author

brettz9 commented Jan 23, 2023

I'm not sure they get them by default if I've understood whatwg/webidl#357 , but I appreciate the reply and can do so re: the tracker next time, thank you.

@brettz9 brettz9 closed this as completed Jan 23, 2023
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