Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@iconstorm/lol-element

Package Overview
Dependencies
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iconstorm/lol-element

A base class for creating Web Components like you know what you're doing

  • 1.0.0-alpha.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
3
Weekly downloads
 
Created
Source

lol element

A base class for creating Web Components like you know what you're doing

TODO

(hint: hide verbose/advanced stuff and/or further explanations inside "toggles" and the end of each section, à la Josh Comeau)


import { LOL, html, css } from 'lol-element/lol.js'

class HelloWorld extends LOL {
  static attributes = [
    { name: 'with-exclamation-mark', boolean: true }
  ]

  static get styles () {
    return css`
      :host { font-size: 300%; }
    `
  }

  template () {
    return html`
      <span>Hello World${this.withExclamationMark ? '!' : ''}</span>
    `
  }
}

customElements.define('lol-hello-world', HelloWorld)

API draft

component class

config
  • static shadowOptions
  • static styles
  • static attributes
  • template()
lifecycle
  • constructor()
  • connectedCallback()
  • disconnectedCallback()
  • attributeChangedCallback()
  • changed()
  • {propertyName}Changed()
  • render()
helpers
  • emit()
props
  • renderRoot

template syntax

  • attributes/properties
  • events
  • refs

exports

  • LOL
  • LOLElement
  • css
  • html*
  • svg*

flavors (view layer)

  • default (µhtml) 3K
  • lit-html 4K
  • Preact 4K
  • roll your own

https://www.urbandictionary.com/define.php?term=lol (4)

used to make something sound less serious or more of a joke even if it's not. similarly used: haha, lmao, lmfao
are you okay?
yeah lol

ur not mad right?
no lol

🍩

FAQs

Package last updated on 29 Jun 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc