@hotwired/turbo 8.0.3 → 8.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Turbo 8.0.3
2
+ Turbo 8.0.4
3
3
  Copyright © 2024 37signals LLC
4
4
  */
5
5
  /**
@@ -126,7 +126,7 @@ class FrameElement extends HTMLElement {
126
126
  loaded = Promise.resolve()
127
127
 
128
128
  static get observedAttributes() {
129
- return ["disabled", "complete", "loading", "src"]
129
+ return ["disabled", "loading", "src"]
130
130
  }
131
131
 
132
132
  constructor() {
@@ -149,11 +149,9 @@ class FrameElement extends HTMLElement {
149
149
  attributeChangedCallback(name) {
150
150
  if (name == "loading") {
151
151
  this.delegate.loadingStyleChanged();
152
- } else if (name == "complete") {
153
- this.delegate.completeChanged();
154
152
  } else if (name == "src") {
155
153
  this.delegate.sourceURLChanged();
156
- } else {
154
+ } else if (name == "disabled") {
157
155
  this.delegate.disabledChanged();
158
156
  }
159
157
  }
@@ -5773,20 +5771,12 @@ class FrameController {
5773
5771
 
5774
5772
  sourceURLReloaded() {
5775
5773
  const { src } = this.element;
5776
- this.#ignoringChangesToAttribute("complete", () => {
5777
- this.element.removeAttribute("complete");
5778
- });
5774
+ this.element.removeAttribute("complete");
5779
5775
  this.element.src = null;
5780
5776
  this.element.src = src;
5781
5777
  return this.element.loaded
5782
5778
  }
5783
5779
 
5784
- completeChanged() {
5785
- if (this.#isIgnoringChangesTo("complete")) return
5786
-
5787
- this.#loadSourceURL();
5788
- }
5789
-
5790
5780
  loadingStyleChanged() {
5791
5781
  if (this.loadingStyle == FrameLoadingStyle.lazy) {
5792
5782
  this.appearanceObserver.start();
@@ -6211,13 +6201,11 @@ class FrameController {
6211
6201
  }
6212
6202
 
6213
6203
  set complete(value) {
6214
- this.#ignoringChangesToAttribute("complete", () => {
6215
- if (value) {
6216
- this.element.setAttribute("complete", "");
6217
- } else {
6218
- this.element.removeAttribute("complete");
6219
- }
6220
- });
6204
+ if (value) {
6205
+ this.element.setAttribute("complete", "");
6206
+ } else {
6207
+ this.element.removeAttribute("complete");
6208
+ }
6221
6209
  }
6222
6210
 
6223
6211
  get isActive() {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Turbo 8.0.3
2
+ Turbo 8.0.4
3
3
  Copyright © 2024 37signals LLC
4
4
  */
5
5
  (function (global, factory) {
@@ -132,7 +132,7 @@ Copyright © 2024 37signals LLC
132
132
  loaded = Promise.resolve()
133
133
 
134
134
  static get observedAttributes() {
135
- return ["disabled", "complete", "loading", "src"]
135
+ return ["disabled", "loading", "src"]
136
136
  }
137
137
 
138
138
  constructor() {
@@ -155,11 +155,9 @@ Copyright © 2024 37signals LLC
155
155
  attributeChangedCallback(name) {
156
156
  if (name == "loading") {
157
157
  this.delegate.loadingStyleChanged();
158
- } else if (name == "complete") {
159
- this.delegate.completeChanged();
160
158
  } else if (name == "src") {
161
159
  this.delegate.sourceURLChanged();
162
- } else {
160
+ } else if (name == "disabled") {
163
161
  this.delegate.disabledChanged();
164
162
  }
165
163
  }
@@ -5779,20 +5777,12 @@ Copyright © 2024 37signals LLC
5779
5777
 
5780
5778
  sourceURLReloaded() {
5781
5779
  const { src } = this.element;
5782
- this.#ignoringChangesToAttribute("complete", () => {
5783
- this.element.removeAttribute("complete");
5784
- });
5780
+ this.element.removeAttribute("complete");
5785
5781
  this.element.src = null;
5786
5782
  this.element.src = src;
5787
5783
  return this.element.loaded
5788
5784
  }
5789
5785
 
5790
- completeChanged() {
5791
- if (this.#isIgnoringChangesTo("complete")) return
5792
-
5793
- this.#loadSourceURL();
5794
- }
5795
-
5796
5786
  loadingStyleChanged() {
5797
5787
  if (this.loadingStyle == FrameLoadingStyle.lazy) {
5798
5788
  this.appearanceObserver.start();
@@ -6217,13 +6207,11 @@ Copyright © 2024 37signals LLC
6217
6207
  }
6218
6208
 
6219
6209
  set complete(value) {
6220
- this.#ignoringChangesToAttribute("complete", () => {
6221
- if (value) {
6222
- this.element.setAttribute("complete", "");
6223
- } else {
6224
- this.element.removeAttribute("complete");
6225
- }
6226
- });
6210
+ if (value) {
6211
+ this.element.setAttribute("complete", "");
6212
+ } else {
6213
+ this.element.removeAttribute("complete");
6214
+ }
6227
6215
  }
6228
6216
 
6229
6217
  get isActive() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hotwired/turbo",
3
- "version": "8.0.3",
3
+ "version": "8.0.4",
4
4
  "description": "The speed of a single-page web application without having to write any JavaScript",
5
5
  "module": "dist/turbo.es2017-esm.js",
6
6
  "main": "dist/turbo.es2017-umd.js",