This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23809 - [Custom]: Ability to look up information about custom elements which have been registered
Summary: [Custom]: Ability to look up information about custom elements which have bee...
Status: RESOLVED LATER
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Dimitri Glazkov
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 14968
  Show dependency treegraph
 
Reported: 2013-11-12 19:49 UTC by Jan Miksovsky
Modified: 2013-11-15 19:53 UTC (History)
0 users

See Also:


Attachments

Description Jan Miksovsky 2013-11-12 19:49:27 UTC
In a variety of situations, it would be helpful to be able to look up information about the custom elements which have been registered with the browser.

For example, I've run into a number of cases where I'm debugging an app with custom elements, and have to work in roundabout ways to determine whether or not an element is being registered properly. For any given element name, I can try document.createElement(name) and see whether the thing I get back has, say, a shadow or not, but that feels hacky.

When debugging under the Polymer ShadowDOMPolyfill, it's actually been quite helpful to be able to inspect the polyfill's CustomElements registry. A similar service would be helpful in debugging native elements.

There are also situations where it'd be useful to have some form of reflection to inspect a custom element type. See https://www.w3.org/Bugs/Public/show_bug.cgi?id=23808 for one specific case in which a meta-element wants to be able to look up information about another element type so that an instance of the latter may be created.

More generally, I've been considering the construction of various tools such as visual design tools for custom elements. Again, these would generally require some means to know which custom elements are available to the browser at the moment.
Comment 1 Dimitri Glazkov 2013-11-15 19:53:25 UTC
Yup. Let's do this in Level 2.