Skip to content

Commit 8479cfa

Browse files
committed
feat(pat stacks): Add a destroy method to unregister event handlers.
1 parent a8aae63 commit 8479cfa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/pat/stacks/stacks.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ class Pattern extends BasePattern {
5050
$(this.document).on("click", "a", this._onClick.bind(this));
5151
}
5252

53+
destroy() {
54+
$(this.document).off("click", "a", this._onClick.bind(this));
55+
}
56+
5357
_setupStack() {
5458
let selected = this._currentFragment();
5559
const $sheets = this.$el.find(this.options.selector);

0 commit comments

Comments
 (0)