function ready () {
   var inputs = [];
   var els = form.elements;
   
   for (var i = 0; i < els.length; i++) {
     var el = els[i];
     
     // file input
     if (el.type == 'file') {
       var clone = el.cloneNode(false);
       el.parentNode.insertBefore(clone, el);
       el.removeAttribute('form');
       shadow.appendChild(el);
       inputs.push([clone, el]);
       continue;
     }
   
     // regular input
     if (submittable(el)) {
       var clone = document.createElement('input');
       clone.type = 'hidden';
       clone.name = el.name;
       clone.value = value(el);
       shadow.appendChild(clone);
     }
   }
   
   events.unbind(iframe, 'load', ready);
   events.bind(iframe, 'load', done);
   
   shadow.submit();
   restore(inputs);
 }
Example #2
0
exports.off = function(el, event, selector, fn, capture){
  switch (typeof selector) {
    case 'function':
      capture = fn;
      fn = selector;
      if (!fn._delegate) break;
    case 'string':
      delegate.unbind(el, event, fn._delegate, capture);
      return this;
  }

  events.unbind(el, event, fn, capture);

  return el;
};
 function done () {
   var err;
   
   // fix for endless progress bar (IE)
   var fix = document.createElement('iframe');
   fix.src = 'javascript:false';
   shadow.appendChild(fix);
   
   try {
     var win = iframe.contentDocument || iframe.contentWindow;
     var res = win.body || win.document.body;
   } catch (e) {
     err = e;
   }
   
   document.body.removeChild(shadow);
   events.unbind(iframe, 'load', done);
   
   fn(err, res.innerHTML);
 }
module.exports.unbind = function (el, callback, capture) {
  if(!callbacks[callback]) return;
  if(support === 'DOMMouseScroll') ev.unbind(el, 'MozMousePixelScroll', callback, capture);
  ev.unbind(el, support, support === 'wheel' ? callback : callbacks[callback], capture);
  delete callbacks[callback];
};
Example #5
0
 this.unbind = function () {
   events.unbind(this.el, 'click');
   events.unbind(this.input, 'change', inputChangeHandler);
   return this;
 };
Example #6
0
 this.elements.all.forEach(elem => {
   events.unbind(elem, 'change', this.change);
   events.unbind(elem, 'propertychange', this.change);
 });
Example #7
0
Mouse.prototype.unbind = function(){
  event.unbind(this.el, 'mousedown', this.down);
  this.down = null;
};
Example #8
0
 // up
 function up(e){
   obj.onmouseup && obj.onmouseup(e);
   event.unbind(document, 'mousemove', move);
   event.unbind(document, 'mouseup', up);
   self.emit('up', e);
 }
Example #9
0
exports.prototype.stop = function () {
  this.running = false;
  event.unbind(this.el, 'scroll', this.scrollHandler);
  if (this.req !== false) raf.cancel(this.req);
  return this;
};
Example #10
0
exports.unbind = function(el, type, fn, capture){
  if (forceCaptureEvents.indexOf(type) !== -1) capture = true;

  event.unbind(el, type, fn, capture);
};
Example #11
0
mouseenter.unbind = function (el, fn) {
  var idx = fns.indexOf(fn)
  if (!~idx) return
  fns.splice(idx, 1)
  events.unbind(el, 'mouseover', listeners.splice(idx, 1)[0])
}
Example #12
0
 event.bind(this.child, transitionend, function shown() {
   if (self.current == i) self.emit('show', self.current, self.currentEl);
   event.unbind(self.child, transitionend, shown);
 });
Example #13
0
 function onload() {
   event.unbind(window, 'load', onload);
   document.body.appendChild(iframe);
 }