Socket
Book a DemoInstallSign in
Socket

web-monetization-polyfill

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web-monetization-polyfill

Polyfills document.monetization for the Web Monetization JavaScript API

latest
Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
11
22.22%
Maintainers
1
Weekly downloads
 
Created
Source

web-monetization-polyfill

npm

Polyfill the Web Monetization JavaScript API on document.monetization

Why

The Coil browser extension will typically load the polyfill for you, but, if you're serving your page with a Content Security Policy, the extension will be unable to inject the polyfill script.

In that case, you'll want to provide the web-monetization-polyfill yourself.

Usage

Install: npm install web-monetization-polyfill

Source: require('web-monetization-polyfill')

While you could, in theory, source this from a CDN in a script tag, you'd have to open up your CSP to allow it, so this method is not recommended. If you must, you'll need to add the current hash to your script-src directive.

Compatibility

web-monetization-polyfillCoil browser add-on
2.0.00.0.52

Copyright for the original source for the polyfill belongs to Coil

Keywords

Web monetization

FAQs

Package last updated on 06 Feb 2021

Did you know?

Socket

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