When the project is refactored to match Chrome's move from properties to getters on DOM objects, it should also be refactored to use methods local to the "within" closure.
It is currently possible for an adversarial page to modify prototype methods, such as RegExp.test to allow /deep/ selectors and get access to .delegate objects despite checks done inside shadowcrypt.
function allowDeep() {
if (this.toString() === "/\/deep\/|>>>/") {
return false;
}
}
RegExp.prototype.test = allowDeep;