2 <script src=
"../../resources/js-test.js"></script>
5 description("Verify WebIDL interface attribute getter/setter function lengths");
7 // http://heycam.github.io/webidl/#dfn-attribute-getter
8 // "The attribute getter is a Function object..."
9 // "The value of the Function object’s"length" property is the Number value 0."
11 shouldBe("Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'title').get.length", "0");
13 // http://heycam.github.io/webidl/#dfn-attribute-setter
14 // "The attribute setter ... is a Function object..."
15 // "The value of the Function object’s "length" property is the Number value 1."
17 shouldBe("Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'title').set.length", "1");