Skip to content

Commit ed24f53

Browse files
committed
minor #1258 [Doc] Fix preConnect/connect inversion in "disconnect()" doc examples (smnandre)
This PR was merged into the 2.x branch. Discussion ---------- [Doc] Fix preConnect/connect inversion in "disconnect()" doc examples Following #1227 i found other similar cases of callback inversion in the documentation. Commits ------- 3f8218f Fix preConnect/connect inversion in "disconnect()" doc examples
2 parents 9db5606 + 3f8218f commit ed24f53

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Diff for: src/Cropperjs/doc/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ custom Stimulus controller:
106106
107107
disconnect() {
108108
// You should always remove listeners when the controller is disconnected to avoid side effects
109-
this.element.removeEventListener('cropperjs:pre-connect', this._onConnect);
110109
this.element.removeEventListener('cropperjs:connect', this._onConnect);
110+
this.element.removeEventListener('cropperjs:pre-connect', this._onPreConnect);
111111
}
112112
113113
_onPreConnect(event) {

Diff for: src/Swup/doc/index.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ Stimulus controller:
156156
157157
disconnect() {
158158
// You should always remove listeners when the controller is disconnected to avoid side-effects
159-
this.element.removeEventListener('swup:pre-connect', this._onConnect);
160-
this.element.removeEventListener('swup:connect', this._onPreConnect);
159+
this.element.removeEventListener('swup:connect', this._onConnect);
160+
this.element.removeEventListener('swup:pre-connect', this._onPreConnect);
161161
}
162162
163163
_onPreConnect(event) {

Diff for: src/Typed/doc/index.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ Stimulus controller:
101101
102102
disconnect() {
103103
// You should always remove listeners when the controller is disconnected to avoid side-effects
104-
this.element.removeEventListener('typed:pre-connect', this._onConnect);
105-
this.element.removeEventListener('typed:connect', this._onPreConnect);
104+
this.element.removeEventListener('typed:connect', this._onConnect);
105+
this.element.removeEventListener('typed:pre-connect', this._onPreConnect);
106106
}
107107
108108
_onPreConnect(event) {

0 commit comments

Comments
 (0)