Shield is a tiny JavaScript shim/library that applies protection against DOM Clobbering attacks at runtime with close to zero integration friction → About | Usage | Installation ( )
DIV#aaa
Since it's in the allowlist, it is allowed to be clobbered
This means attempting to access it will return DIV#aaa
DOM node (click here to see)
DIV#bbb
Since it's NOT in the allowlist, it is NOT allowed to be clobbered
This means attempting to access it will throw an Error (click here to see)
window[YOUR_VALUE]
- this will throw an Error as well.
Content-Security-Policy: "dom-clobbering: 'aaa'"