Separate out logic in initialisation code to help in separating native vs non-native code paths when supporting document.registerElement.
Implement native custom element support.