JSPM

@lite-embeds/core

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

Shared base class and utilities for lite-embed facade web components

Package Exports

  • @lite-embeds/core

Readme

@lite-embeds/core

npm bundle license

Shared base class and helpers for lite-embeds components. You typically don't install this directly — install a platform package such as @lite-embeds/twitter and the right pieces come along.

Exports

  • LiteEmbed — abstract HTMLElement subclass. Subclasses implement renderFacade() and hydrate(). Handles click / keyboard activation and Shadow DOM setup.
  • loadScript(src) — dedup'd script injector. Multiple components on the same page that share an embed script only trigger one network request.
  • whenVisible(element, callback) — IntersectionObserver helper for opt-in lazy work.

License

MIT