JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 42
  • Score
    100M100P100Q54356F
  • License MIT

Utility library for sharing.

Package Exports

  • sharejs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (sharejs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

sharejs

Utility library for sharing.

Usage

  1. If you're using an SDK channel (see type) like Facebook Send; configure the SDK first.
  2. Use createCallback to get a function you can attach to any DOM event listener. Or use the share function directly if you want to do custom event handling.

Note: Social SDK's are loaded asynchronously on demand (when you call configure()), so beware of popup blockers. A ready method is provided that returns a promise which will be resolved when the SDK is ready to be used. (configure returns the same promise.)

Example

See example/app.js. You can run the example with npm start and opening your browser at http://localhost:8080/webpack-dev-server/bundle. HOST and PORT can be customized through ENVIRONMENT variables.

Resources

More share links! More features! More fun!