Here is how Angular Elements implements the Custom Elements API under the hood! [Part 1] The post is here.