You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 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.
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.
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!
The text was updated successfully, but these errors were encountered: