mol_dump_lib 0.0.244 → 0.0.246

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/node.mjs CHANGED
@@ -5155,8 +5155,11 @@ var $;
5155
5155
  }
5156
5156
  click(event) {
5157
5157
  const cb = $mol_wire_sync(this.$.$mol_dom_context.navigator.clipboard);
5158
- cb.writeText(this.text());
5159
- cb.write(this.attachments());
5158
+ cb.writeText?.(this.text());
5159
+ cb.write?.(this.attachments());
5160
+ if (cb.writeText === undefined && cb.write === undefined) {
5161
+ throw new Error("doesn't support copy to clipoard");
5162
+ }
5160
5163
  }
5161
5164
  }
5162
5165
  __decorate([
package/node.test.js CHANGED
@@ -5146,8 +5146,11 @@ var $;
5146
5146
  }
5147
5147
  click(event) {
5148
5148
  const cb = $mol_wire_sync(this.$.$mol_dom_context.navigator.clipboard);
5149
- cb.writeText(this.text());
5150
- cb.write(this.attachments());
5149
+ cb.writeText?.(this.text());
5150
+ cb.write?.(this.attachments());
5151
+ if (cb.writeText === undefined && cb.write === undefined) {
5152
+ throw new Error("doesn't support copy to clipoard");
5153
+ }
5151
5154
  }
5152
5155
  }
5153
5156
  __decorate([