On 09/01/2017 11:01 AM, Boris Zbarsky wrote:
Anyway, we need a replacement. Some possible options:
1) Use "obj instanceof Whatever". The problem is that we'd like to
maybe kill off the cross-global instanceof behavior we have now for
DOM constructors.
2) Introduce chromeonly "is" methods on all DOM constructors. So
"HTMLEmbedElement.is(obj)". Possibly with some nicer but uniform name.
How about this slight variation:
HTMLEmbedElement.isInstanceOf(obj)
instead of "is"?
Also, is this something that we can codegen in WebIDL based on the
presence of [HTMLConstructor] or something like that?
3) Introduce chromeonly "isWhatever" methods (akin to Array.isArray)
on DOM constructors. So "HTMLEmbedElement.isHTMLEmbedElement(obj)".
Kinda wordy and repetitive...
4) Something else?
Thoughts? It really would be nice to get rid of some of this stuff
going forward. And since the web platform seems to be punting on
branding, there's no existing solution we can use.
-Boris
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform