mediawiki.api: Don't abort token requests in postWithToken()
authorMatt Russell <public@matt-russell.com>
Thu, 30 Jun 2016 06:57:24 +0000 (16:57 +1000)
committerMatt Russell <public@matt-russell.com>
Wed, 6 Jul 2016 02:12:24 +0000 (12:12 +1000)
commitc0eea2ba5716ffcbbeb6532827c9caf3af7f46bd
treeb15e8ce728d06513440e8e4214393066d196fb34
parent4d8738f6e6be98fc8cab79555e987cf468756faf
mediawiki.api: Don't abort token requests in postWithToken()

Per Ie05d267f1.

Other requests can still make use of the token, even if this one won't, so
only abort the actual request if it is currently running, otherwise abort it
as soon as the token request finishes.

The only caveat with this method is an abort while a token request is running
isn't instantaneous, which perhaps isn't expected, but I doubt it matters.

Change-Id: Ib34e2e3a7f8ca5eb0832c4a6c1623a638381e6c8
resources/src/mediawiki/api.js