Skip to content

Commit 4972be5

Browse files
authored
Merge pull request #1 from MaritzSTL/fix/remove-polyfill
Removing intersection-observer polyfill
2 parents 85348ee + 296e78b commit 4972be5

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

bower.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"description": "Polymer behavior providing useful hooks into HTMLElement state (i.e, element.isVisible if the element is displayed to the user).",
44
"main": "deep-element-behavior.html",
55
"dependencies": {
6-
"deep-intersection-observer": "MaritzSTL/deep-intersection-observer#^0.0.2",
76
"polymer": "Polymer/polymer#^1.0 || ^2.0"
87
},
98
"devDependencies": {

deep-element-behavior.html

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<link rel="import" href="../deep-intersection-observer/deep-intersection-observer.html">
2-
31
<script>
42
window.deep = window.deep || {};
53

@@ -21,11 +19,9 @@
2119
this.__visibilityObserver.observe(this);
2220

2321
const that = this;
24-
if (typeof that.__visibilityObserver._checkForIntersections === 'function') {
25-
window.addEventListener('checkForIntersections', function() {
26-
that.__visibilityObserver._checkForIntersections();
27-
});
28-
}
22+
window.addEventListener('checkForIntersections', function() {
23+
that.__visibilityObserver._checkForIntersections();
24+
});
2925
},
3026
detached() {
3127
this.__visibilityObserver.disconnect();

0 commit comments

Comments
 (0)