LibWeb: Change attribute type to USVString where applicable

Also mark USVString attributes as containing a URL, where applicable.
This commit is contained in:
Tim Ledbetter 2024-08-08 10:35:57 +01:00 committed by Andreas Kling
commit 1369fc5069
Notes: github-actions[bot] 2024-08-17 05:59:13 +00:00
19 changed files with 66 additions and 23 deletions

View file

@ -0,0 +1,28 @@
<!DOCTYPE html>
<script src="include.js"></script>
<script>
test(() => {
let elementList = [
{ "audio": "src" },
{ "embed": "src" },
{ "frame": "longDesc" },
{ "frame": "src" },
{ "iframe": "longDesc" },
{ "iframe": "src" },
{ "img": "src" },
{ "link": "href" },
{ "object": "codeBase" },
{ "object": "data" },
{ "script": "src" },
{ "source": "src" },
{ "track": "src" },
{ "video": "src" },
];
for (const elementDescriptor of elementList) {
[elementName, propertyName] = Object.entries(elementDescriptor)[0];
const element = document.createElement(elementName);
element[propertyName] = "\udddda\uddddb\udddd";
println(`${elementName}.${propertyName} final URL path segment: ${element[propertyName].split("/").pop()}`);
}
});
</script>