Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@aofl/element

Package Overview
Dependencies
Maintainers
2
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aofl/element

aofl-element extends lit-element and overrides the _render() function. It accepts a template function and an String[] of styles. It is intented to be used in place of lit-element as the base class for elements. In it's current version it doesn't do much o

latest
Source
npmnpm
Version
3.14.1
Version published
Weekly downloads
14
-50%
Maintainers
2
Weekly downloads
 
Created
Source

@aofl/aofl-element

aofl-element extends lit-element and overrides the _render() function. It accepts a template function and an String[] of styles. It is intented to be used in place of lit-element as the base class for elements. In it's current version it doesn't do much other than provide a clean interface to sperate HTML, CSS and JavaScript context. It makes it easier to change the template on the fly (see @aofl/i18n-mixin.)

Api Documentation

Methods

NameParametersDescription
_render{Function} template, {String[]} stylesRe-evaluate the example code

code example

import {AoflElement} from '@aofl/web-components/aofl-element';
import template from './template.js',
import styles from 'index.css'

class MyElement extends AoflElement {
  static get is() {
    return 'my-element';
  }

  _render() {
    return super.render(template, [styles])
  };
}

customElements.define(MyElement.is, MyElement)

Keywords

aofl-element

FAQs

Package last updated on 18 Mar 2022

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