// New ECMAScript 5 capabilities
["ES5 direct-prototype-access", function () { return Object.getPrototypeOf(document.createElement('div')) == HTMLDivElement.prototype; } ],
["DOM objects can be 'locked' with ES5 preventExtensions", function () { var d = document.createElement('div'); Object.preventExtensions(d); d.extensionVal = "test"; return (d.extensionVal != "test"); } ],
["DOM properties (ES5 accessors) created on appropriate prototypes", function () { return Node.prototype.hasOwnProperty("nodeName"); } ],
["'Get' function of accessor properties can be executed", function () { return document.nodeName == "#document"; } ],
["'Set' function of accessor property can be executed", function () { document.body.lastChild.data = ""; return document.body.lastChild.data == ""; } ],
["DOM accessors can be deleted", function () { delete Element.prototype.tagName; var retVal = document.body.tagName === undefined; /* Restore for next iteration */Object.defineProperty(Element.prototype, "tagName", backupTagNamePropDesc); return retVal; } ],