pyloid 0.23.0__tar.gz → 0.23.1__tar.gz

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,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pyloid
3
- Version: 0.23.0
3
+ Version: 0.23.1
4
4
  Summary:
5
5
  Author: aesthetics-of-record
6
6
  Author-email: 111675679+aesthetics-of-record@users.noreply.github.com
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyloid"
3
- version = "0.23.0"
3
+ version = "0.23.1"
4
4
  description = ""
5
5
  authors = ["aesthetics-of-record <111675679+aesthetics-of-record@users.noreply.github.com>"]
6
6
  readme = "README.md"
@@ -566,14 +566,17 @@ class _BrowserWindow:
566
566
  console.error('QWebChannel is not defined.');
567
567
  }
568
568
  """
569
- js_api_init = "\n".join(
570
- [
571
- f"window['{js_api.__class__.__name__}'] = channel.objects['{js_api.__class__.__name__}'];\n"
572
- # f"console.log('{js_api.__class__.__name__} object initialized:', window.pyloid['{js_api.__class__.__name__}']);"
573
- for js_api in self.js_apis
574
- ]
575
- )
576
- self.web_view.page().runJavaScript(js_code % js_api_init)
569
+ # js_api_init = "\n".join(
570
+ # [
571
+ # f"window['{js_api.__class__.__name__}'] = channel.objects['{js_api.__class__.__name__}'];\n"
572
+ # f"console.log('{js_api.__class__.__name__} object initialized:', window.pyloid['{js_api.__class__.__name__}']);"
573
+ # for js_api in self.js_apis
574
+ # ]
575
+ # )
576
+
577
+ base_api_init = "window['__PYLOID__'] = channel.objects['__PYLOID__'];\n"
578
+
579
+ self.web_view.page().runJavaScript(js_code % base_api_init)
577
580
 
578
581
  # if splash screen is set, close it when the page is loaded
579
582
  if self.close_on_load and self.splash_screen:
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes