@potch/html-bin 1.1.1 → 1.1.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@potch/html-bin",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/index.js CHANGED
@@ -434,8 +434,11 @@ export const createBin = ({
434
434
  };
435
435
 
436
436
  // mount bin and start
437
- container.append(binEl);
438
- widthObserver.observe(binEl);
437
+ const start = () => widthObserver.observe(binEl);
438
+ if (container) {
439
+ container.append(binEl);
440
+ start();
441
+ }
439
442
 
440
443
  // destroy / teardown
441
444
  const findEffects = (node) => {
@@ -454,8 +457,10 @@ export const createBin = ({
454
457
  };
455
458
 
456
459
  return {
460
+ el: binEl,
457
461
  editors,
458
462
  activeTab,
463
+ start,
459
464
  teardown,
460
465
  };
461
466
  };