JSPM

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

Package Exports

  • @atomico/wrapper/proxy
  • @atomico/wrapper/types

Readme

@atomico/wrapper

This package provides the basic functionalities to create wrappers for Atomico with SSR support.

import { createAuto } from "@atomico/wrapper";

function myWrapper(tagName: string, base: CustomElementConstructor) {
    return document.createElement(tagName);
}

const auto = createAuto(myWrapper);

class MyElement extends HTMLElement {}

customElements.define("my-element", MyElement);

auto(MyElement);