This document describes how custom elements v1 work when they are defined or used in HTML Imports.
HTML Imports is currently implemented only in Chrome, and this document provides non-normative information about Chrome's implementation in M54 and later, for the reference of future works that tries to achieve similar functionality like HTML Imports.
As the global context window
is shared with script running in an imported document, you can access the custom elements registry via window.customElements
. This is straightforward and no different from the usage in a usual HTML document.