したらばTOP ■掲示板に戻る■ 全部 1-100 最新50 | メール | |

管理人の独り言(プログラミング関連)

2676ACUVE★:2010/09/08(水) 13:30:31
// 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; } ],


新着レスの表示


名前: E-mail(省略可)

※書き込む際の注意事項はこちら

※画像アップローダーはこちら

(画像を表示できるのは「画像リンクのサムネイル表示」がオンの掲示板に限ります)

掲示板管理者へ連絡 無料レンタル掲示板