Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 3 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/permission-element/install/install-element-feature-detect.tentative.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset=utf-8>
<title>Install Element: Feature detection</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(() => {
const el = document.createElement("install");
assert_true(el instanceof HTMLInstallElement,
"install element should be an instance of HTMLInstallElement");
}, "Test HTMLInstallElement existence and instanceof");
test(() => {
for (const property of [
"manifest",
"manifestId",
"isValid",
"invalidReason",
"onvalidationstatuschange",
]) {
assert_true(Object.hasOwn(HTMLInstallElement.prototype, property),
`${property} should be an own property of HTMLInstallElement.prototype`);
}
}, "Test HTMLInstallElement manifest and validation properties");
test(() => {
for (const property of [
"initialPermissionStatus",
"permissionStatus",
"onpromptaction",
"onpromptdismiss",
]) {
assert_false(property in HTMLInstallElement.prototype,
`${property} should not be exposed on HTMLInstallElement`);
}
}, "Test HTMLInstallElement permission properties");
</script>