Skip to content

Commit

Permalink
Merge pull request #1 from MaritzSTL/fix/remove-polyfill
Browse files Browse the repository at this point in the history
Removing intersection-observer polyfill
  • Loading branch information
laurkatz13 authored Jul 13, 2022
2 parents 85348ee + 296e78b commit 4972be5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
1 change: 0 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"description": "Polymer behavior providing useful hooks into HTMLElement state (i.e, element.isVisible if the element is displayed to the user).",
"main": "deep-element-behavior.html",
"dependencies": {
"deep-intersection-observer": "MaritzSTL/deep-intersection-observer#^0.0.2",
"polymer": "Polymer/polymer#^1.0 || ^2.0"
},
"devDependencies": {
Expand Down
10 changes: 3 additions & 7 deletions deep-element-behavior.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<link rel="import" href="../deep-intersection-observer/deep-intersection-observer.html">

<script>
window.deep = window.deep || {};

Expand All @@ -21,11 +19,9 @@
this.__visibilityObserver.observe(this);

const that = this;
if (typeof that.__visibilityObserver._checkForIntersections === 'function') {
window.addEventListener('checkForIntersections', function() {
that.__visibilityObserver._checkForIntersections();
});
}
window.addEventListener('checkForIntersections', function() {
that.__visibilityObserver._checkForIntersections();
});
},
detached() {
this.__visibilityObserver.disconnect();
Expand Down

0 comments on commit 4972be5

Please sign in to comment.