SHARE
TWEET

Untitled

a guest Aug 24th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import htm from 'htm';
  2. import styles from './app-footer.module.scss';
  3. import htmRenderer from '../../../htm-renderer';
  4.  
  5. const html = htm.bind(htmRenderer);
  6.  
  7. class AppFooter extends HTMLElement {
  8.  
  9.   constructor() {
  10.     super();
  11.   }
  12.  
  13.   connectedCallback () {
  14.     const shadow = this.attachShadow({mode: 'open'});
  15.     const frag = document.createDocumentFragment();
  16.     const styleEl = document.createElement('style');
  17.     styleEl.innerHTML = styles;
  18.     frag.appendChild(styleEl);
  19.  
  20.     const content = html`<div>app-footer Works!</div>`;
  21.     frag.appendChild(content);
  22.  
  23.     shadow.appendChild(frag);
  24.  
  25.   }
  26. }
  27.  
  28. export default AppFooter;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top