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); }
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]; };
this.unbind = function () { events.unbind(this.el, 'click'); events.unbind(this.input, 'change', inputChangeHandler); return this; };
this.elements.all.forEach(elem => { events.unbind(elem, 'change', this.change); events.unbind(elem, 'propertychange', this.change); });
Mouse.prototype.unbind = function(){ event.unbind(this.el, 'mousedown', this.down); this.down = null; };
// up function up(e){ obj.onmouseup && obj.onmouseup(e); event.unbind(document, 'mousemove', move); event.unbind(document, 'mouseup', up); self.emit('up', e); }
exports.prototype.stop = function () { this.running = false; event.unbind(this.el, 'scroll', this.scrollHandler); if (this.req !== false) raf.cancel(this.req); return this; };
exports.unbind = function(el, type, fn, capture){ if (forceCaptureEvents.indexOf(type) !== -1) capture = true; event.unbind(el, type, fn, capture); };
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]) }
event.bind(this.child, transitionend, function shown() { if (self.current == i) self.emit('show', self.current, self.currentEl); event.unbind(self.child, transitionend, shown); });
function onload() { event.unbind(window, 'load', onload); document.body.appendChild(iframe); }