Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.

Commit 36971a0

Browse files
committed
Update about removal of event whitelist from unmount method.
1 parent 6ba100f commit 36971a0

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

docs/api.html

+1-24
Original file line numberDiff line numberDiff line change
@@ -493,30 +493,7 @@ <h1>Hello, {message}!</h1>
493493

494494
<p> </p>
495495
<h2>Component - unmount</h2>
496-
<p>If you want to destroy a comonent, removing it from the DOM, you will use this method. It gets executed on the component instance. <code>unmount</code> deletes the component base element from the DOM and nulls out all its properties on its instance for garbage collection. As of version 1.2.0, when Composi unmounts a component, it will attempt to unbind a whitelist of events, passing the component reference to it. This will unbind the events if you used the <code>handleEvent</code> interface. If you used callbacks for events, then you will need to unbind them by passing a reference to the callback to prevent memory leaks.</p>
497-
<p>Here are the events that get removed automatically:</p>
498-
<ul>
499-
<li>click</li>
500-
<li>dblclick</li>
501-
<li>mousedown</li>
502-
<li>mouseup</li>
503-
<li>mouseover</li>
504-
<li>mouseout</li>
505-
<li>mouseover</li>
506-
<li>mouseleave</li>
507-
<li>pointercancel</li>
508-
<li>pointerdown</li>
509-
<li>pointermove</li>
510-
<li>pointerup</li>
511-
<li>select</li>
512-
<li>input</li>
513-
<li>change</li>
514-
<li>keydown</li>
515-
<li>keypress</li>
516-
<li>keyup</li>
517-
<li>submit</li>
518-
</ul>
519-
<p>If you've used other events not in this list, you will need to manually unbind them before unmounting a component.</p>
496+
<p>If you want to destroy a comonent, removing it from the DOM, you will use this method. It gets executed on the component instance. <code>unmount</code> deletes the component base element from the DOM and nulls out all its properties on its instance for garbage collection. Before version 5.2.2, Composi would try to unbind a whitelist of events from the component base before unmounting. Now, before unmounting you need to remove any event listeners yourself. </p>
520497

521498
<pre>
522499
<code class="language-javascript">

0 commit comments

Comments
 (0)