Socket
Book a DemoInstallSign in
Socket

@evolv-delivery/template

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@evolv-delivery/template

A minimal template engine

latest
Source
npmnpm
Version
0.2.1
Version published
Maintainers
0
Created
Source

Template

This package provides an evolv environment integration to setup event handlers for nested html templates.

Setup in the Evolv Manager

Adding an integration to the Evolv Manager

The setup for this integration does not require any json config.

How to use

The main point is to bind window.html to a handler supporting html template creation.

An example usage:


function button(name){
  return html`
  <button 
    @click=${()=>console.info('You clicked', name)} 
    @mousemove=${()=>console.info('mouse moved for', name)}>${name}
  </button>
  `
}

function banner(names){
  return html`
  <div> <span>This is a banner with some button.</span>
   ${names.map(button)}
  </div>`;
}

banner(['hello', 'world']).render('body', 'afterbegin');


Keywords

lit

FAQs

Package last updated on 27 Aug 2024

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