mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
LibWeb/DOM: Implement the Document object's partial attributes
This commit is contained in:
parent
ded344aa2c
commit
75626c6cd2
Notes:
sideshowbarker
2024-07-17 03:35:24 +09:00
Author: https://github.com/PGHales
Commit: 75626c6cd2
Pull-request: https://github.com/SerenityOS/serenity/pull/23956
Reviewed-by: https://github.com/LucasChollet
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/tcl3
5 changed files with 125 additions and 0 deletions
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
function testPartialDocumentAttribute(documentAttr, bodyAttr) {
|
||||
println(`before document.${documentAttr}=${document[documentAttr]}`);
|
||||
println(`before body attribute ${bodyAttr}=${document.body.getAttribute(bodyAttr)}`);
|
||||
document[documentAttr] = "red";
|
||||
println(`after document.${documentAttr}=${document[documentAttr]}`);
|
||||
println(`after body attribute ${bodyAttr}=${document.body.getAttribute(bodyAttr)}`);
|
||||
}
|
||||
testPartialDocumentAttribute("fgColor", "text");
|
||||
testPartialDocumentAttribute("linkColor", "link");
|
||||
testPartialDocumentAttribute("alinkColor", "alink");
|
||||
testPartialDocumentAttribute("vlinkColor", "vlink");
|
||||
testPartialDocumentAttribute("bgColor", "bgcolor");
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue