TL;DR This great article explains what characters are permitted in javascript. Unfortunately, those won’t work as expected with elements. At least, at the moment.
The reason is that document.registerElement
which is being called on newly created custom elements, will fail:
var a = document.registerElement('a-ℵ');
//⇒ Uncaught SyntaxError: Failed to execute
// 'registerElement' on 'Document':
// Registration failed for type 'a-ℵ'.
// The type name is invalid.
That’s because registerElement
tries to create internal constructor, different from generic function HTMLElement()
/function HTMLUnknownElement()
for registered elements:
console.log(document.registerElement('a-b'));
//⇒ function a-b() { [native code] }
I would suggest the internals of browsers are not yet ready for:
//⇒ function a-ℵ() { [native code] }
though you might easily specify:
var ℵ = function() { console.log('IT WORKS') };
ℵ();
//⇒ IT WORKS
I understand this is not exactly an answer you expected, but I hope it sheds some light.