mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-18 07:22:22 +00:00
LibWeb: Implement HTMLIFrameElement.loading
This commit is contained in:
parent
9ee061ea14
commit
600daea544
Notes:
sideshowbarker
2024-07-18 05:01:22 +09:00
Author: https://github.com/jamierocks
Commit: 600daea544
Pull-request: https://github.com/SerenityOS/serenity/pull/24425
Reviewed-by: https://github.com/tcl3
3 changed files with 25 additions and 1 deletions
|
@ -0,0 +1,5 @@
|
||||||
|
loading = eager
|
||||||
|
|
||||||
|
loading = lazy
|
||||||
|
|
||||||
|
loading = eager
|
18
Tests/LibWeb/Text/input/HTML/iframe-element-loading.html
Normal file
18
Tests/LibWeb/Text/input/HTML/iframe-element-loading.html
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<iframe id="testFrame"></iframe>
|
||||||
|
<script src="../include.js"></script>
|
||||||
|
<script>
|
||||||
|
test(() => {
|
||||||
|
const iframe = document.getElementById('testFrame');
|
||||||
|
|
||||||
|
println(`loading = ${iframe.loading}`);
|
||||||
|
println('');
|
||||||
|
|
||||||
|
iframe.loading = 'lazy';
|
||||||
|
|
||||||
|
println(`loading = ${iframe.loading}`);
|
||||||
|
println('');
|
||||||
|
|
||||||
|
iframe.loading = 'invalid-value';
|
||||||
|
println(`loading = ${iframe.loading}`);
|
||||||
|
});
|
||||||
|
</script>
|
|
@ -1,4 +1,5 @@
|
||||||
#import <HTML/HTMLElement.idl>
|
#import <HTML/HTMLElement.idl>
|
||||||
|
#import <HTML/Scripting/Fetching.idl>
|
||||||
#import <DOM/Document.idl>
|
#import <DOM/Document.idl>
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/iframe-embed-object.html#htmliframeelement
|
// https://html.spec.whatwg.org/multipage/iframe-embed-object.html#htmliframeelement
|
||||||
|
@ -16,7 +17,7 @@ interface HTMLIFrameElement : HTMLElement {
|
||||||
[CEReactions, Reflect] attribute DOMString width;
|
[CEReactions, Reflect] attribute DOMString width;
|
||||||
[CEReactions, Reflect] attribute DOMString height;
|
[CEReactions, Reflect] attribute DOMString height;
|
||||||
[FIXME, CEReactions] attribute DOMString referrerPolicy;
|
[FIXME, CEReactions] attribute DOMString referrerPolicy;
|
||||||
[FIXME, CEReactions] attribute DOMString loading;
|
[CEReactions, Enumerated=LazyLoadingAttribute, Reflect] attribute DOMString loading;
|
||||||
readonly attribute Document? contentDocument;
|
readonly attribute Document? contentDocument;
|
||||||
readonly attribute WindowProxy? contentWindow;
|
readonly attribute WindowProxy? contentWindow;
|
||||||
Document? getSVGDocument();
|
Document? getSVGDocument();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue