@reset-framework/sdk 1.1.5 → 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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/client.js +26 -26
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reset-framework/sdk",
3
- "version": "1.1.5",
3
+ "version": "1.2.0",
4
4
  "type": "module",
5
5
  "description": "Browser-side SDK for Reset Framework applications.",
6
6
  "license": "MIT",
package/src/client.js CHANGED
@@ -717,38 +717,38 @@ function createNetApi(transport) {
717
717
  })
718
718
  }
719
719
 
720
- function scheduleFrontendReadySignal(transport) {
721
- const target = typeof globalThis === "object" ? globalThis.window : undefined
722
-
723
- if (typeof target === "undefined") {
720
+ function scheduleFrontendReadySignal(transport) {
721
+ const target = typeof globalThis === "object" ? globalThis.window : undefined
722
+
723
+ if (typeof target === "undefined") {
724
724
  return
725
725
  }
726
726
 
727
727
  if (target.__resetFrontendReadySignalScheduled) {
728
728
  return
729
729
  }
730
-
731
- target.__resetFrontendReadySignalScheduled = true
732
-
733
- let attempts = 0
734
- const maxAttempts = 20
735
-
736
- const trySignal = () => {
737
- if (transport.isAvailable()) {
738
- transport.invokeRaw("runtime.signalFrontendReady", {}).catch(() => {})
739
- return
740
- }
741
-
742
- attempts += 1
743
- if (attempts >= maxAttempts) {
744
- return
745
- }
746
-
747
- setTimeout(trySignal, 100)
748
- }
749
-
750
- queueMicrotask(trySignal)
751
- }
730
+
731
+ target.__resetFrontendReadySignalScheduled = true
732
+
733
+ let attempts = 0
734
+ const maxAttempts = 20
735
+
736
+ const trySignal = () => {
737
+ if (transport.isAvailable()) {
738
+ transport.invokeRaw("runtime.signalFrontendReady", {}).catch(() => {})
739
+ return
740
+ }
741
+
742
+ attempts += 1
743
+ if (attempts >= maxAttempts) {
744
+ return
745
+ }
746
+
747
+ setTimeout(trySignal, 100)
748
+ }
749
+
750
+ queueMicrotask(trySignal)
751
+ }
752
752
 
753
753
  export function createResetClient(source) {
754
754
  const transport = createResetTransport(source)