Skip to content

Commit 4575125

Browse files
authored
Merge pull request #25 from Amphiluke/issue-24
Revise widget removal from the DOM
2 parents a31c7bb + 5cf60b3 commit 4575125

File tree

7 files changed

+138
-120
lines changed

7 files changed

+138
-120
lines changed

dist/handy-scroll.es6.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
handy-scroll v1.1.4
2+
handy-scroll v1.1.5
33
https://amphiluke.github.io/handy-scroll/
44
(c) 2024 Amphiluke
55
*/
@@ -189,7 +189,7 @@ https://amphiluke.github.io/handy-scroll/
189189
instance.eventHandlers.forEach(({el, handlers}) => {
190190
Object.keys(handlers).forEach(event => el.removeEventListener(event, handlers[event], false));
191191
});
192-
instance.widget.parentNode.removeChild(instance.widget);
192+
instance.widget.remove();
193193
instance.eventHandlers = instance.widget = instance.container = instance.scrollBody = null;
194194
}
195195
};

dist/handy-scroll.es6.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/handy-scroll.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
handy-scroll v1.1.4
2+
handy-scroll v1.1.5
33
https://amphiluke.github.io/handy-scroll/
44
(c) 2024 Amphiluke
55
*/
@@ -194,7 +194,7 @@ https://amphiluke.github.io/handy-scroll/
194194
return el.removeEventListener(event, handlers[event], false);
195195
});
196196
});
197-
instance.widget.parentNode.removeChild(instance.widget);
197+
instance.widget.remove();
198198
instance.eventHandlers = instance.widget = instance.container = instance.scrollBody = null;
199199
}
200200
};

dist/handy-scroll.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)