From 2d000c8ced32829156182658ff8c0b3150714f0a Mon Sep 17 00:00:00 2001 From: EnixCoda Date: Tue, 19 Nov 2019 10:40:03 +0800 Subject: [PATCH] fix: drop attach-form --- packages/pjax/index.js | 2 -- packages/pjax/lib/proto/parse-element.js | 7 ------- 2 files changed, 9 deletions(-) diff --git a/packages/pjax/index.js b/packages/pjax/index.js index 2f2763a..a1919d1 100644 --- a/packages/pjax/index.js +++ b/packages/pjax/index.js @@ -75,8 +75,6 @@ Pjax.prototype = { attachLink: require("./lib/proto/attach-link.js"), - attachForm: require("./lib/proto/attach-form.js"), - forEachSelectors: function(cb, context, DOMContext) { return forEachSelectors.bind(this)(this.options.selectors, cb, context, DOMContext) }, diff --git a/packages/pjax/lib/proto/parse-element.js b/packages/pjax/lib/proto/parse-element.js index 8214a67..153fe82 100644 --- a/packages/pjax/lib/proto/parse-element.js +++ b/packages/pjax/lib/proto/parse-element.js @@ -9,13 +9,6 @@ module.exports = function(el) { } break - case "form": - // only attach link if el does not already have link attached - if (!el.hasAttribute(attrState)) { - this.attachForm(el) - } - break - default: throw "Pjax can only be applied on or
submit" }