docs: function bind()
          {
            bind.injectPrototypes(Node,'Node');
            bind.injectPrototypes(Element,'Element');
            bind.injectPrototypes(HTMLElement,'HTMLElement');
            bind.injectPrototypes(HTMLInputElement,'HTMLInputElement');
            bind.injectPrototypes(HTMLTextAreaElement,'HTMLTextAreaElement');
            bind.injectPrototypes(Document,'Document');
  
            var __set = _set,
                __update = _update;
  
            function hasInput(attrListeners)
            {
              var attrs = ['value','checked'],
                  _localListeners = attrListeners,
                  _localAttr = _localListeners._attrListeners,
                  _localUpdateAttr = _localListeners._attrUpdateListeners,
                  _localParentAttr = _localListeners._parentAttrListeners,
                  _localParentUpdateAttr = _localListeners._parentAttrUpdateListeners,
                  has = false;
  
              if(_attrListeners[_all] !== undefined || _attrUpdateListeners[_all] !== undefined)
              {
                has = true;
              }
              if(has !== true && _localAttr[_all] !== undefined ||
                 _localUpdateAttr[_all] !== undefined ||
                 _localParentAttr[_all] !== undefined ||
                 _localParentUpdateAttr[_all] !== undefined)
              {
                has = true;
              }
              if(has !== true)
              {
                for(var x=0;x<attrs.length;x++)
                {
                  if(_attrListeners[attrs[x]] !== undefined ||
                     _attrUpdateListeners[attrs[x]] !== undefined ||
                     _localAttr[attrs[x]] !== undefined ||
                     _localUpdateAttr[attrs[x]] !== undefined ||
                     _localParentAttr[attrs[x]] !== undefined ||
                     _localParentUpdateAttr[attrs[x]] !== undefined)
                    {
                      has = true;
                      break;
                    }
                }
              }
              return has;
            }
  
            function getStyles(arr,styles)
            {
              var x,
                  _arr = arr,
                  _styles = styles,
                  len = styles.length;
              for(x=0;x<len;x++)
              {
                if(_arr.indexOf(_styles[x]) === -1)
                {
                  _arr.push(_styles[x]);
                }
              }
              return _arr;
            }
  
            function hasStyle(attrListeners)
            {
              var _globalStyle = Object.keys(_styleListeners),
                  _globalStyleUpdate = Object.keys(_styleUpdateListeners),
                  _localListeners = attrListeners,
                  _localStyle = Object.keys(_localListeners._styleListeners),
                  _localUpdateStyle = Object.keys(_localListeners._styleUpdateListeners),
                  _localParentStyle = Object.keys(_localListeners._parentStyleListeners),
                  _localParentUpdateStyle = Object.keys(_localListeners._parentStyleUpdateListeners),
                  has = [];
  
              if(_globalStyle.length !== 0 ||
                 _globalStyleUpdate.length !== 0)
              {
                has = getStyles(has,_globalStyle);
                has = getStyles(has,_globalStyleUpdate);
              }
              if(has.length !== 0 && _localParentStyle.length !== 0 ||
                 _localParentUpdateStyle.length !== 0)
              {
                has = getStyles(has,_localParentStyle);
                has = getStyles(has,_localParentUpdateStyle);
              }
              if(has.indexOf(_all) !== -1) has = _allStyles;
              return has;
            }
  
            function copyListeners(listeners,copyTo)
            {
              var listenerProps = Object.keys(listeners),
                  _currProp,
                  _currListener;
              for(var x=0,len=listenerProps.length;x<len;x++)
              {
                _currProp = listenerProps[x];
                if(copyTo[_currProp] === undefined)
                {
                  copyTo[_currProp] = listeners[_currProp].slice();
                }
                else
                {
                  for(var i=0,lenI=listeners[_currProp].length;i<lenI;i++)
                  {
                    _currListener = listeners[_currProp][i];
                    copyTo[_currProp].push(_currListener);
                  }
                }
              }
            }
  
            function reSync(e)
            {
              if(e.target.nodeType !== 3 && e.target.nodeType !== 8)
              {
                var attrListeners = e.target.attrListeners(),
                    _hasInput = hasInput(attrListeners),
                    _hasStyle = hasStyle(attrListeners),
                    _hasStyleLen = _hasStyle.length,
                    _parentAttr,
                    _parentAttrUpdate,
                    _parentStyle,
                    _parentStyleUpdate,
                    _listeners,
                    nodes = [],
                    len,
                    outer = ((e.attr === 'outerHTML' || e.attr === 'outerText') ? e.attr : undefined),
                    target = e.target
  
                if(outer !== undefined)
                {
                  e.attr = 'appendChild',
                  e.arguments = [e.target];
                  e.target = e.target.parentElement;
                }
  
                if(_hasInput)
                {
                  if(e.attr === 'appendChild' && e.arguments[0].nodeType !== 3 && e.arguments[0].nodeType !== 8)
                  {
                    nodes = Array.prototype.slice.call(e.arguments[0].querySelectorAll('input,textarea'));
                    if(e.arguments[0].tagName === 'INPUT' || e.arguments[0].tagName === 'TEXTAREA')
                    {
                      nodes.unshift(e.arguments[0])
                    }
                  }
                  else
                  {
                    nodes = Array.prototype.slice.call(e.target.querySelectorAll('input,textarea'));
                  }
                  len = nodes.length;
                  for(var x=0;x<len;x++)
                  {
                    if(nodes[x].addInputBinding !== undefined) nodes[x].addInputBinding();
                    if(nodes[x].addInputBoxBinding !== undefined) nodes[x].addInputBoxBinding();
                  }
                }
  
                if(e.attr === 'appendChild' && e.arguments[0].nodeName !== '#text' && e.arguments[0].nodeName !== '#comment')
                {
                  nodes = Array.prototype.slice.call(e.arguments[0].querySelectorAll('*'));
                  nodes.unshift(e.arguments[0]);
                  _parentAttr = e.target.__kb._parentAttrListeners;
                  _parentAttrUpdate = e.target.__kb._parentAttrUpdateListeners;
                  _parentStyle = e.target.__kb._parentStyleListeners;
                  _parentStyleUpdate = e.target.__kb._parentStyleUpdateListeners;
                }
                else
                {
                  nodes = Array.prototype.slice.call(e.target.querySelectorAll('*'));
                  _parentAttr = e.target.__kb._parentAttrListeners;
                  _parentAttrUpdate = e.target.__kb._parentAttrUpdateListeners;
                  _parentStyle = e.target.__kb._parentStyleListeners;
                  _parentStyleUpdate = e.target.__kb._parentStyleUpdateListeners;
                }
                len = nodes.length;
  
                  for(var x=0;x<len;x++)
                  {
                    if(_hasStyleLen !== 0)
                    {
                      for(var i=0;i<_hasStyleLen;i++)
                      {
                        bind.injectStyleProperty(nodes[x],_hasStyle[i]);
                      }
                    }
                    _listeners = nodes[x].attrListeners();
  
                    copyListeners(_parentAttr,_listeners._parentAttrListeners);
                    copyListeners(_parentAttrUpdate,_listeners._parentAttrUpdateListeners);
                    copyListeners(_parentStyle,_listeners._parentStyleListeners);
                    copyListeners(_parentStyleUpdate,_listeners._parentStyleUpdateListeners);
                  }
  
                if(outer !== undefined)
                {
                  e.attr = outer;
                  e.target = target;
                  e.arguments = [];
                }
              }
            }
  
            function checkAttr(e)
            {
              var oldAttr = e.target.attributes[e.arguments[0]],
                  old = (oldAttr !== undefined ? oldAttr.value : ""),
                  val = (e.attr === 'setAttribute' ? e.arguments[1] : "");
                if(!__set(e.target,e.arguments[0],val,old,[val])){
                  e.preventDefault();
                }
            }
  
            function checkAttrUpdate(e)
            {
              var oldAttr = e.target.attributes[e.arguments[0]],
                  old = (oldAttr !== undefined ? oldAttr.value : ""),
                  val = (e.attr === 'setAttribute' ? e.arguments[1] : "");
                  __update(e.target,e.arguments[0],val,old,[val]);
            }
  
            //for keeping binds with inputs
            bind.addAttrUpdateListener('appendChild',reSync);
            bind.addAttrUpdateListener('removeChild',reSync);
            bind.addAttrUpdateListener('innerHTML',reSync);
            bind.addAttrUpdateListener('outerHTML',reSync);
            bind.addAttrUpdateListener('innerText',reSync);
            bind.addAttrUpdateListener('outerText',reSync);
            bind.addAttrUpdateListener('textContent',reSync);
  
            //allows for html attribute changes to be listened to just like properties
            bind.addAttrListener('setAttribute',checkAttr);
            bind.addAttrListener('removeAttribute',checkAttr);
  
            bind.addAttrUpdateListener('setAttribute',checkAttrUpdate);
            bind.addAttrUpdateListener('removeAttribute',checkAttrUpdate);
  
            return bind;
          }