examples/dependencies/x-div/x-div.js
function registerXDiv() {
  // Create our 'x-div' Web Component Prototype
  var xProto = Object.create(HTMLElement.prototype);

  // Create methods for its lifecycle
  xProto.attachedCallback = function () {
    var scriptEl = document.createElement('script');

    if (!this.dataset.controller) {
      console.error('No controller specified for x-div.');
      return;
    }

    scriptEl.src = getControllerSrc(this.dataset.controller);
    scriptEl.async = true;
    this.appendChild(scriptEl);
  };

  // Register the Element
  document.registerElement('x-div', {
    prototype: xProto
  });
}
function registerXDiv() {
  // Create our 'x-div' Web Component Prototype
  var xProto = Object.create(HTMLElement.prototype);

  // Create methods for its lifecycle
  xProto.attachedCallback = function () {
    var scriptEl = document.createElement('script');

    if (!this.dataset.controller) {
      console.error('No controller specified for x-div.');
      return;
    }

    scriptEl.src = getControllerSrc(this.dataset.controller);
    scriptEl.async = true;
    this.appendChild(scriptEl);
  };

  // Register the Element
  document.registerElement('x-div', {
    prototype: xProto
  });
}
Registers the `x-div` HTMLElement
@method registerXDiv
@return {void}