mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 15:32:31 +00:00
LibWeb: Return empty string if image element currentSrc
URL is invalid
This commit is contained in:
parent
bab086694a
commit
4f7a4d9c57
Notes:
github-actions[bot]
2024-08-15 07:45:34 +00:00
Author: https://github.com/tcl3
Commit: 4f7a4d9c57
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1080
3 changed files with 19 additions and 1 deletions
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
const elementList = [
|
||||
{ "img": "currentSrc" },
|
||||
];
|
||||
for (const elementDescriptor of elementList) {
|
||||
[elementName, propertyName] = Object.entries(elementDescriptor)[0];
|
||||
const element = document.createElement(elementName);
|
||||
println(`${elementName}.${propertyName} default value: '${element[propertyName]}'`);
|
||||
}
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue