XML has a way of namespacing tags. The idea was applied, somewhat unsuccessfully, to html. HTML5 kind of nixed it (I think). I’m not aware of why it was nixed, so perhaps I’m missing some of the lessons learned. But I think we should give it another try:
Proposal:
Just like with import maps, be able to place a script tag in the head part of an html document:
<html>
<head>
<script type="module">
import {mySymbol} from 'my-library/myLib.js';
window.registerAttributePrefix('foo', mySymbol);
</script>
</head>
<body>
<button id="myButton" foo-bar="hello">My Button</button>
<script type="module">
import {mySymbol} from 'my-library/myLib.js';
console.log(myButton.getAttribute(mySymbol, "bar"));
// "hello"
myButton.setAttribute(mySymbol, "bar", "goodbye");
</script>
</body>
</html>