From cf7fa50e82479d61fb35863e0685ceb2d1488935 Mon Sep 17 00:00:00 2001 From: pk Date: Tue, 30 Dec 2025 23:38:32 +0100 Subject: [PATCH] Add cancel method to fetch mixin. --- fetch-mixin.js | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/fetch-mixin.js b/fetch-mixin.js index b3d75e9..c581bb2 100644 --- a/fetch-mixin.js +++ b/fetch-mixin.js @@ -5,6 +5,10 @@ export const fetchMixin = function(superClass) { this.__abortControllers = new Map(); } + cancel(method, url) { + return this.__cancelRunningRequest(method, url); + } + get(url, overwrite = true) { return this.do('GET', url, null, overwrite); } diff --git a/package.json b/package.json index f81b149..9b3c964 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tp/helpers", - "version": "2.10.2", + "version": "2.10.3", "description": "", "main": "closest.js", "scripts": {