sliccy 1.0.5 → 1.1.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.
@@ -113,7 +113,10 @@ export function buildElectronOverlayInjectionCall(options) {
113
113
  if (options.activeTab) {
114
114
  payload['activeTab'] = options.activeTab;
115
115
  }
116
- return `window.__SLICC_ELECTRON_OVERLAY__?.inject(${JSON.stringify(payload)});`;
116
+ // Wait for document.body before injecting — Runtime.evaluate and
117
+ // addScriptToEvaluateOnNewDocument can fire before the DOM is ready.
118
+ const call = `window.__SLICC_ELECTRON_OVERLAY__?.inject(${JSON.stringify(payload)});`;
119
+ return `if(document.body){${call}}else{document.addEventListener('DOMContentLoaded',function(){${call}});}`;
117
120
  }
118
121
  export function buildElectronOverlayBootstrapScript(options) {
119
122
  return `${options.bundleSource}\n${buildElectronOverlayInjectionCall(options)}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sliccy",
3
- "version": "1.0.5",
3
+ "version": "1.1.0",
4
4
  "description": "Browser-based coding agent with thin CLI server",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",