Socket
Socket
Sign inDemoInstall

xe-clipboard

Package Overview
Dependencies
0
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    xe-clipboard

Copy the contents to the clipboard, support commonly used H5 browser IE, Chrome, Firefox, Opera, Safari, IOS, Android.


Version published
Maintainers
1
Install size
10.3 kB
Created

Readme

Source

xe-clipboard

npm version npm downloads gzip size: JS npm license

It depends on the execCommand APIs, support commonly used H5 browser IE, Chrome, Firefox, Opera, Safari, IOS, Android.
compressed by gzip: < 0.5KB

Browser Support

IEEdgeChromeFirefoxOperaSafari
10+ ✔Latest ✔42+ ✔41+ ✔29+ ✔10+ ✔

Installing

npm install xe-clipboard

Get on unpkg and cdnjs

<script src="https://cdn.jsdelivr.net/npm/xe-clipboard"></script>

Example

Run Test

<button class="button">Copy</button>
document.querySelector('.button').addEventListener('click', function (evnt) {
  if (XEClipboard.copy('Copy this content to the clipboard.')) {
    alert('Copy success.')
  } else {
    alert('The browser is not supported.')
  }
})

License

MIT License, 2017-present, Xu Liangzhan

Keywords

FAQs

Last updated on 23 Aug 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc