Skip to content

Commit 06ce73c

Browse files
committed
linting cleanup
1 parent 4c4d4b8 commit 06ce73c

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

deep-element-behavior.html

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
window.deep = window.deep || {};
55

66
// TODO: JSDoc
7-
ElementBehaviorImpl = {
7+
const ElementBehaviorImpl = {
88
properties: {
99
/* True if the element is visible to the user. False otherwise. */
1010
isVisibleToUser: {
1111
type: Boolean,
12-
value: false
13-
}
12+
value: false,
13+
},
1414
},
1515
attached() {
1616
// NOTE: A null root defaults to the device view port.
1717
this.__visibilityObserver = new IntersectionObserver(this.__updateVisibility.bind(this), {
1818
root: this.parentNode || null,
19-
threshold: [0, 1.0]
19+
threshold: [0, 1.0],
2020
});
2121
this.__visibilityObserver.observe(this);
2222

@@ -29,11 +29,12 @@
2929
this.__visibilityObserver.disconnect();
3030
},
3131
__updateVisibility(entries) {
32-
if(!Array.isArray(entries) || !entries.length) return;
32+
if (!Array.isArray(entries) || !entries.length) return;
3333
const boundingRectangle = entries[0].boundingClientRect || {height: 0, width: 0};
3434
const {height, width} = boundingRectangle;
3535
this.set('isVisibleToUser', Boolean(height) || Boolean(width));
36-
}
36+
},
3737
};
38-
deep.ElementBehavior = [ElementBehaviorImpl];
38+
39+
window.deep.ElementBehavior = [ElementBehaviorImpl];
3940
</script>

0 commit comments

Comments
 (0)