Search code examples
web-componentaframe

How does A-Frame define its own HTML elements?


Does A-Frame uses Web Components suite's APIs, like Custom Elements, Shadow DOM, HTML Templates, and HTML imports, to define all its primitives that goes with their own tags?


Solution

  • A-Frame use the custom elements API (document.registerElement) with a polyfill for the browsers that don't implement the specification. It currently uses the v0 revision of the API but it will move soon to v1. It does not make use of Shadow DOM, HTML templates / imports or other fancy features under the Web Components umbrella.