Skip to content

Commit 7709c9b

Browse files
authored
Merge pull request #205 from mfranzke/refactor/xo-feedback
refactor: xo feedback
2 parents 5e43d9c + 8b09e09 commit 7709c9b

10 files changed

+35
-31
lines changed

demo/index.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Test for dynamically inserted images and iframes
2-
let addDynamicContent = (event) => {
3-
let divElement = document.createElement('div'),
4-
imageElement = document.createElement('img'),
5-
iframeElement = document.createElement('iframe');
2+
const addDynamicContent = (event) => {
3+
const divElement = document.createElement('div');
4+
const imageElement = document.createElement('img');
5+
const iframeElement = document.createElement('iframe');
66

77
imageElement.setAttribute('is', 'loading-image');
88
// We're using a differing string at the end of the query than the regular one embedded directly into the page
@@ -26,8 +26,10 @@ let addDynamicContent = (event) => {
2626
iframeElement.setAttribute('width', '320');
2727
iframeElement.setAttribute('height', '180');
2828

29+
/* eslint-disable unicorn/prefer-dom-node-append */
2930
divElement.appendChild(imageElement);
3031
divElement.appendChild(iframeElement);
32+
/* eslint-enable unicorn/prefer-dom-node-append */
3133

3234
document.querySelector('main').insertAdjacentElement('beforeend', divElement);
3335

@@ -39,5 +41,7 @@ document
3941
.addEventListener('click', addDynamicContent);
4042

4143
// Importing the two files which show how to register these elements as custom elements builtin extends
42-
import 'loading-attribute-polyfill.custom-builtin-extend.image.js';
43-
import 'loading-attribute-polyfill.custom-builtin-extend.iframe.js';
44+
/* eslint-disable import/no-unassigned-import, import/first */
45+
import './loading-attribute-polyfill.custom-builtin-extend.image.js';
46+
import './loading-attribute-polyfill.custom-builtin-extend.iframe.js';
47+
/* eslint-enable import/no-unassigned-import, import/first */

dist/loading-attribute-polyfill.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/loading-attribute-polyfill.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/loading-attribute-polyfill.modern.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/loading-attribute-polyfill.modern.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/loading-attribute-polyfill.module.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/loading-attribute-polyfill.module.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/loading-attribute-polyfill.umd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)