Define and register a new custom element.

xtag.register(NAME, DEFINITION)

ArgumentTypeDescription
NAMEStringThe custom element's tag name (must contain a dash)
DEFINITIONObjectAn object containing the various features your custom element will utilize
xtag.register('x-shouter', {
  content: '<input type="text" />',
  lifecycle:{
    created: function(){
      alert(this.firstElementChild);
      // Alerts the input specified via the 'content' property
    }
  },
  methods: {
    shout: function(message){
      setTimeout(function(){
       alert(message);
      }, this.delay);
    }
  },
  accessors: {
    delay: {
      attribute: {}
    }
  },
  events: {
    tap: function(){
    	this.shout(this.firstElementChild.value);
    }
  }
});