mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-11-11 02:31:04 +00:00
19 lines
901 B
HTML
19 lines
901 B
HTML
|
|
<!DOCTYPE html>
|
||
|
|
<script src="../include.js"></script>
|
||
|
|
<script>
|
||
|
|
test(() => {
|
||
|
|
const elementName = "a";
|
||
|
|
const attributeNames = ["accept", "accesskey"];
|
||
|
|
for (const attributeName of attributeNames) {
|
||
|
|
const htmlElement = document.createElement(elementName);
|
||
|
|
htmlElement.setAttribute(attributeName, "TeSt");
|
||
|
|
println(`The ${attributeName} attribute is matched case insensitively in HTML documents ${htmlElement.matches(`[${attributeName}^=test]`)}`);
|
||
|
|
|
||
|
|
const xmlDocument = new Document();
|
||
|
|
const xmlElement = xmlDocument.createElementNS("http://www.w3.org/1999/xhtml", elementName);
|
||
|
|
xmlElement.setAttribute(attributeName, "TeSt");
|
||
|
|
println(`The ${attributeName} attribute is matched case insensitively in XML documents ${xmlElement.matches(`[${attributeName}^=test]`)}`);
|
||
|
|
}
|
||
|
|
});
|
||
|
|
</script>
|