Ticket #1386 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

support the more standard request.abort() instead of request.transport.abort()

Reported by: tschaub Owned by:
Priority: major Milestone: 2.6 Release
Component: general Version: 2.5
Keywords: Cc:
State: Complete

Description

I'm calling this a bug because I don't want to be locked in to a weird API. The loadURL function is used a lot. More than other Ajax stuff. It should return something with the XMLHttpRequest interface. See the Request proposal? for my preference.

I'd like to get out from under this prototype.js mess instead of getting more deeply buried in it.

Attachments

ajax.patch Download (1.4 KB) - added by crschmidt 5 years ago.
no_transport.patch Download (3.5 KB) - added by tschaub 5 years ago.
make loadURL look like it returns a real XHR instance

Change History

Changed 5 years ago by tschaub

  • milestone changed from 2.6 Release to 2.7 Release

If nobody else has an opinion here, this shouldn't hold up the release.

Changed 5 years ago by crschmidt

  • milestone changed from 2.7 Release to 2.6 Release

We need to either do this in 2.6, or 3.0: It was added in 2.6, and I'm okay with breaking the API since it isn't in a release yet, but as soon as it is, it will make me cranky.

Changed 5 years ago by crschmidt

Also, I think you're right that it should be changed, since that likely wasn't clear from the above.

Changed 5 years ago by crschmidt

Changed 5 years ago by crschmidt

  • state set to Review

Like this?

Changed 5 years ago by tschaub

  • state changed from Review to Needs More Work

Great solution. Needs a bit more work.

Changed 5 years ago by tschaub

  • state changed from Needs More Work to Review

Tests passing (FF & Safari).

Changed 5 years ago by tschaub

make loadURL look like it returns a real XHR instance

Changed 5 years ago by crschmidt

  • state changed from Review to Commit

Tests pass. API Changing is an API that was added since 2.5. Seems relatively low risk. Please commit.

Changed 5 years ago by tschaub

  • status changed from new to closed
  • state changed from Commit to Complete
  • resolution set to fixed

(In [6408]) The loadURL function now returns something that acts more like XMLHttpRequest should. If you name this return request, call request.abort to abort the request. r=crschmidt (closes #1386)

Note: See TracTickets for help on using tickets.