phoenix_live_view 1.2.0-rc.3 → 1.2.0

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.
@@ -5047,6 +5047,9 @@ removing illegal node: "${("outerHTML" in childNode && childNode.outerHTML || ch
5047
5047
  });
5048
5048
  }
5049
5049
  onJoinError(resp) {
5050
+ if (resp.events) {
5051
+ this.liveSocket.dispatchEvents(resp.events);
5052
+ }
5050
5053
  if (resp.reason === "reload") {
5051
5054
  this.log("error", () => [
5052
5055
  `failed mount with ${resp.status}. Falling back to page reload`,
@@ -6109,7 +6112,7 @@ removing illegal node: "${("outerHTML" in childNode && childNode.outerHTML || ch
6109
6112
  * Returns the version of the LiveView client.
6110
6113
  */
6111
6114
  version() {
6112
- return "1.2.0-rc.3";
6115
+ return "1.2.0";
6113
6116
  }
6114
6117
  /**
6115
6118
  * Returns true if profiling is enabled. See {@link enableProfiling} and {@link disableProfiling}.
@@ -6133,7 +6136,7 @@ removing illegal node: "${("outerHTML" in childNode && childNode.outerHTML || ch
6133
6136
  * Enables debugging.
6134
6137
  *
6135
6138
  * When debugging is enabled, the LiveView client will log debug information to the console.
6136
- * See [Debugging client events](https://hexdocs.pm/phoenix_live_view/js-interop.html#debugging-client-events) for more information.
6139
+ * See [Debugging client events](https://phoenix-live-view.hexdocs.pm/js-interop.html#debugging-client-events) for more information.
6137
6140
  */
6138
6141
  enableDebug() {
6139
6142
  this.sessionStorage.setItem(PHX_LV_DEBUG, "true");
@@ -6162,7 +6165,7 @@ removing illegal node: "${("outerHTML" in childNode && childNode.outerHTML || ch
6162
6165
  * Enables latency simulation.
6163
6166
  *
6164
6167
  * When latency simulation is enabled, the LiveView client will add a delay to requests and responses from the server.
6165
- * See [Simulating Latency](https://hexdocs.pm/phoenix_live_view/js-interop.html#simulating-latency) for more information.
6168
+ * See [Simulating Latency](https://phoenix-live-view.hexdocs.pm/js-interop.html#simulating-latency) for more information.
6166
6169
  */
6167
6170
  enableLatencySim(upperBoundMs) {
6168
6171
  this.enableDebug();
@@ -6237,7 +6240,7 @@ removing illegal node: "${("outerHTML" in childNode && childNode.outerHTML || ch
6237
6240
  /**
6238
6241
  * Executes an encoded JS command, targeting the given element.
6239
6242
  *
6240
- * See [`Phoenix.LiveView.JS`](https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.JS.html) for more information.
6243
+ * See [`Phoenix.LiveView.JS`](https://phoenix-live-view.hexdocs.pm/Phoenix.LiveView.JS.html) for more information.
6241
6244
  */
6242
6245
  execJS(el, encodedJS, eventType = null) {
6243
6246
  const e = new CustomEvent("phx:exec", { detail: { sourceElement: el } });
@@ -6247,7 +6250,7 @@ removing illegal node: "${("outerHTML" in childNode && childNode.outerHTML || ch
6247
6250
  * Returns an object with methods to manipulate the DOM and execute JavaScript.
6248
6251
  * The applied changes integrate with server DOM patching.
6249
6252
  *
6250
- * See [JavaScript interoperability](https://hexdocs.pm/phoenix_live_view/js-interop.html) for more information.
6253
+ * See [JavaScript interoperability](https://phoenix-live-view.hexdocs.pm/js-interop.html) for more information.
6251
6254
  */
6252
6255
  js() {
6253
6256
  return js_commands_default(this, "js");