demo · v143
Character Permissivity
Try a tag name with non-ASCII characters. Before v143 the DOM APIs threw InvalidCharacterError for anything the HTML parser would happily accept. v143 relaxes the JS path to match the parser.
pick a sample name, or type your own
document.createElement(name)
—
document.querySelector(name)
—
Click Try it. Green = the browser accepted the name as a valid element identifier. Red = it threw.
the call
// v143 widens what JS DOM APIs accept to match the HTML parser
const el = document.createElement("café-card");
document.body.appendChild(el);
document.querySelector("café-card"); // returns el