Skip to content

Commit 20b2b0a

Browse files
committed
2 parents fc007ce + bd34c0c commit 20b2b0a

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

demo/index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@
4747
<link rel="stylesheet" href="../dist/loading-attribute-polyfill.css" />
4848

4949
<!-- Include polyfill for custom elements and built-in extends support -->
50-
<script src="//unpkg.com/@ungap/custom-elements"></script>
50+
<script
51+
src="https://unpkg.com/@ungap/custom-elements@1.0.0/min.js"
52+
integrity="sha384-Qnq8e4Wl3sSEVAjRedbJV4qEzrdUTWrz34w5/aTeTwdbf71mHIS7+LbnfDdazp+6"
53+
crossorigin="anonymous"
54+
></script>
5155
</head>
5256
<body>
5357
<header>

demo/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,22 @@ let addDynamicContent = (event) => {
55
iframeElement = document.createElement('iframe');
66

77
imageElement.setAttribute('is', 'loading-image');
8+
// We're using a differing string at the end of the query than the regular one embedded directly into the page
89
imageElement.setAttribute(
910
'src',
10-
'img/lazyimg-src-loadinglazy.250x150.guetzli.jpg?loading=lazy&image-width=250&image-height=150&dynamic'
11+
'img/lazyimg-src-loadinglazy.250x150.guetzli.jpg?loading=lazy&image-width=250&image-height=150&dynamic-example-query'
1112
);
1213
imageElement.setAttribute('loading', 'lazy');
1314
imageElement.setAttribute('alt', '..');
1415
imageElement.setAttribute('width', '250');
1516
imageElement.setAttribute('height', '150');
1617

1718
iframeElement.setAttribute('is', 'loading-iframe');
18-
iframeElement.setAttribute('src', 'iframe.html?loading=lazy&dynamic');
19+
// We're using a differing string at the end of the query than the regular one embedded directly into the page
20+
iframeElement.setAttribute(
21+
'src',
22+
'iframe.html?loading=lazy&dynamic-example-query'
23+
);
1924
iframeElement.setAttribute('loading', 'lazy');
2025
iframeElement.setAttribute('title', '..');
2126
iframeElement.setAttribute('width', '320');

0 commit comments

Comments
 (0)