include the current element as the target
This commit is contained in:
carson 2022-02-04 10:49:52 -07:00
parent 872e6ad2d6
commit 6c103b150e

View File

@ -1119,7 +1119,7 @@ return (function () {
var nodeData = getInternalData(elt);
nodeData.timeout = setTimeout(function () {
if (bodyContains(elt) && nodeData.cancelled !== true) {
if (!maybeFilterEvent(spec, makeEvent('hx:poll:trigger', {triggerSpec:spec}))) {
if (!maybeFilterEvent(spec, makeEvent('hx:poll:trigger', {triggerSpec:spec, target:elt}))) {
issueAjaxRequest(verb, path, elt);
}
processPolling(elt, verb, getAttributeValue(elt, "hx-" + verb), spec);