1796 ? i.call(e).done(t).fail(n)
1797 : e && m((i = e.then))
1798 ? i.call(e, t, n)
1799 : t.apply(void 0, [e].slice(r)); 1800 } catch (e) {
1801 n.apply(void 0, [e]);
1802 }
1796 ? i.call(e).done(t).fail(n)
1797 : e && m((i = e.then))
1798 ? i.call(e, t, n)
1799 : t.apply(void 0, [e].slice(r)); 1800 } catch (e) {
1801 n.apply(void 0, [e]);
1802 }
1796 ? i.call(e).done(t).fail(n)
1797 : e && m((i = e.then))
1798 ? i.call(e, t, n)
1799 : t.apply(void 0, [e].slice(r)); 1800 } catch (e) {
1801 n.apply(void 0, [e]);
1802 }
1796 ? i.call(e).done(t).fail(n)
1797 : e && m((i = e.then))
1798 ? i.call(e, t, n)
1799 : t.apply(void 0, [e].slice(r)); 1800 } catch (e) {
1801 n.apply(void 0, [e]);
1802 }
10545 var e = this.prop.apply(this, arguments);
10546 return (e && e.jquery) || "string" == typeof e
10547 ? e
10548 : this.attr.apply(this, arguments);10549 }),
10550 (q.fn.ajaxSubmit = function (M, e, t, r) {
10551 if (!this.length)
Before ES2015, one must use Function.prototype.apply()
to call variadic functions.
var args = [1, 2, 3, 4];
Math.max.apply(Math, args);
In ES2015, one can use spread syntax to call variadic functions.
var args = [1, 2, 3, 4];
Math.max(...args);
foo.apply(undefined, args);
foo.apply(null, args);
obj.foo.apply(obj, args);
// Using spread syntax
foo(...args);
obj.foo(...args);
// The `this` binding is different.
foo.apply(obj, args);
obj.foo.apply(null, args);
obj.foo.apply(otherObj, args);
// The argument list is not variadic.
// Those are warned by the `no-useless-call` rule.
foo.apply(undefined, [1, 2, 3]);
foo.apply(null, [1, 2, 3]);
obj.foo.apply(obj, [1, 2, 3]);