Skip to content

Instantly share code, notes, and snippets.

@rowan-m
Created August 28, 2019 17:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rowan-m/8d65306f4bdfcf610586ccac19bd8f7f to your computer and use it in GitHub Desktop.
Save rowan-m/8d65306f4bdfcf610586ccac19bd8f7f to your computer and use it in GitHub Desktop.
const template = document.createElement('template');
template.innerHTML = `...✂️`;
// 1. Prepare template!
window.ShadyCSS && ShadyCSS.prepareTemplate(template, 'input-knob');
class InputKnob extends HTMLElement {
constructor() {
super();
// 2. If the polyfill is active, fix those styles!
window.ShadyCSS && ShadyCSS.styleElement(this);
this.attachShadow({ mode: 'open' });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment