Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/editing/dnd/the-draggable-attribute/draggable-enumerated-ascii-case-insensitive.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="assert" content="@draggable values are ASCII case-insensitive">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!--
We use <img> elements here so the invalid value default (auto) can be
distinguished from false through the IDL attribute. Most other elements
return false from the IDL attribute for the auto state too.
-->
<img draggable="false">
<img draggable="FaLsE">
<img draggable="falſe">
<script>
const img = document.querySelectorAll("img");
test(() => {
assert_equals(img[0].draggable, false, "lowercase valid");
assert_equals(img[1].draggable, false, "mixed case valid");
assert_equals(img[2].draggable, true, "non-ASCII invalid");
}, "keyword false");
</script>