# "Copy to Clipboard" button not working on embedded notebook

**URL:** <https://talk.observablehq.com/t/copy-to-clipboard-button-not-working-on-embedded-notebook/6940>\
**Category:** Help\
**Created:** [August 19, 2022, 12:52pm UTC](https://talk.observablehq.com/t/copy-to-clipboard-button-not-working-on-embedded-notebook/6940 "2022-08-19T12:52:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gordo](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/gordo/32/5026_2.png) [@gordo](https://talk.observablehq.com/u/gordo)\
**Post date:** [August 19, 2022, 12:52pm UTC](https://talk.observablehq.com/t/copy-to-clipboard-button-not-working-on-embedded-notebook/6940/1 "2022-08-19T12:52:47Z")

</div>

I implemented a copy to clipboard button (as suggested in the [Button Inputs](https://observablehq.com/@observablehq/input-button#cell-254) notebook by @mbostock) so that users can save/share the current state of [this notebook](https://observablehq.com/@targetsmart/fwvf-election-results).

Works great on Observable but not on my [static site](http://fwvf-site.s3-website-us-east-1.amazonaws.com/election-results.html) that embeds the notebook via vanilla JS.

The console shows a “Uncaught TypeError: navigator.clipboard is undefined…” whenever I click the button. Can interact with navigator, though

---

<div class="post-metadata">

**Author:** ![mootari](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mootari/32/581_2.png) [@mootari](https://talk.observablehq.com/u/mootari)\
**Post date:** [August 19, 2022, 7:18pm UTC](https://talk.observablehq.com/t/copy-to-clipboard-button-not-working-on-embedded-notebook/6940/2 "2022-08-19T19:18:17Z")

</div>

Your page must be served via https with a valid certificate for `clipboard` to be available.

---

<div class="post-metadata">

**Author:** ![gordo](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/gordo/32/5026_2.png) [@gordo](https://talk.observablehq.com/u/gordo)\
**Post date:** [August 19, 2022, 8:33pm UTC](https://talk.observablehq.com/t/copy-to-clipboard-button-not-working-on-embedded-notebook/6940/3 "2022-08-19T20:33:49Z")

</div>

Ah. Thank you for explaining that.
