Shield JS 🛡️

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 ( )

This is 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)


This is 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)




Try it yourself: (access is allowed)

view parsed html