mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
LibWeb: Change attribute type to USVString where applicable
Also mark USVString attributes as containing a URL, where applicable.
This commit is contained in:
parent
335d51d678
commit
1369fc5069
Notes:
github-actions[bot]
2024-08-17 05:59:13 +00:00
Author: https://github.com/tcl3
Commit: 1369fc5069
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1059
Reviewed-by: https://github.com/shannonbooth
19 changed files with 66 additions and 23 deletions
28
Tests/LibWeb/Text/input/usvstring-url-reflection.html
Normal file
28
Tests/LibWeb/Text/input/usvstring-url-reflection.html
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue