code: function CustomFactory (mainFactory, elements) {
  	BaseFactory.call(this);
  	this._mainFactory = mainFactory;
  
  	if (!mainFactory) {
  		throw new Error("main factory must be provided. User string, or dom");
  	}
  
  	this._factories = {
  		element: {}
  	}
  
  	if (elements) {
  		for (var name in elements) {
  			this.registerElement(name, elements[name]);
  		}
  	}
  }
docs: @module
  @submodule mojo-core
   
  
  ### Example
  
  ```javascript
  var nofactor = require("nofactor");
  
  use string factory
  customNodeFactory = nofactor.custom(nofactor.string);
  
  register BR void element
  customNodeFactory.registerElement("br", nofactor.string.Element.extend({
  toString: function () {
  return "<" + this.name + ">";
  }
  }));
  <br>
  console.log(customNodeFactory.createElement("br").toString());
  ```
  
  @class CustomNodeFactory
  @extends BaseNodeFactory
  @constructor
  @param {BaseNodeFactory} nodeFactory the main node factory to call