demo/bundle.js
// Basically taken from material-components-web repo under component.js
Basically taken from material-components-web repo under component.js
Basically taken from material - components - web repo under component . js
function emitCustomEvent(el, type, data, shouldBubble = false) {
              let evt;
              if (typeof CustomEvent === 'function') {
                evt = new CustomEvent(type, {
                  detail: data,
                  bubbles: shouldBubble,
                });
              } else {
                evt = document.createEvent('CustomEvent');
                evt.initCustomEvent(type, shouldBubble, false, data);
              }
              el.dispatchEvent(evt);
            }
function emitCustomEvent ( el , type , data , shouldBubble = false ) { let evt ; if ( typeof CustomEvent === 'function' ) { evt = new CustomEvent ( type , { detail : data , bubbles : shouldBubble , } ) ; } else { evt = document . createEvent ( 'CustomEvent' ) ; evt . initCustomEvent ( type , shouldBubble , false , data ) ; } el . dispatchEvent ( evt ) ; }
Basically taken from material-components-web repo under component.js
Basically taken from material - components - web repo under component . js