Test [[IsHTMLDDA]] object with `typeof` operator (#2706)

This commit is contained in:
Alexey Shvayka 2020-07-22 00:14:56 +03:00 committed by GitHub
parent 5a01caed71
commit c619375b46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,27 @@
// Copyright (C) 2020 Alexey Shvayka. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-IsHTMLDDA-internal-slot-typeof
description: >
`typeof` operator returns "undefined" for [[IsHTMLDDA]] object.
info: |
Changes to the typeof Operator
The following table entry is inserted into Table 35 immediately
preceeding the entry for "Object (implements [[Call]])":
Type of val: Object (has an [[IsHTMLDDA]] internal slot)
Result: "undefined"
features: [IsHTMLDDA]
---*/
var IsHTMLDDA = $262.IsHTMLDDA;
assert(typeof IsHTMLDDA === "undefined", '=== "undefined"');
assert.sameValue(typeof IsHTMLDDA, "undefined");
assert(typeof IsHTMLDDA !== "object", '!== "object"');
assert.sameValue(typeof IsHTMLDDA === "object", false, '!== "object"');
assert(typeof IsHTMLDDA !== "function", '!== "function"');
assert.sameValue(typeof IsHTMLDDA === "function", false, '!== "function"');