vanilla-ele

Easy create HTMLElement:

Usage no npm install needed!

<script type="module">
  import vanillaEle from 'https://cdn.skypack.dev/vanilla-ele';
</script>

README

vanilla-ele

Example:

Easy create HTMLElement:

const buttonFuture = Ele.future()

  const body = Ele("div", { className: bem`_body` }, [
    Ele("div", {
      onclick: handleGoToUserClick,
      className: bem`_goToUser`,
      textContent: "go to user"
    }),
    ...Array(50)
      .fill(0)
      .map((v, i) => {
        return Ele("div", { textContent: "label" + i });
      }),
    buttonFuture.Ele("div", {
      onclick: handleGoToUserClick,
      className: bem`_goToUser`,
      textContent: "go to user2"
    })
  ]);

  console.log(buttonFuture.target);