You could possibly mangle the namespace for these elements in a predictable fashion. I.e., for each, the new prefix = restricted-<prefix> & namespaceURI = restricted:<namespaceURI>?

The other option is to actually check the element type. HTMLElement is a cross-browser type, and is the only element type I have seen on IE, Chrome & FF that can have JS directly injected or attached. Perhaps there is a way to distinguish that element type from non-HTML element types based on node properties or something?