Open Bug 1848004 Opened 9 months ago Updated 9 months ago

Refactor event type code in XMLHttpRequest code

Categories

(Core :: DOM: Core & HTML, task)

task

Tracking

()

ASSIGNED

People

(Reporter: twisniewski, Assigned: twisniewski)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We can improve the way we handle passing around and identifying readystatechange and progress events in the XMLHttpRequest classes to reduce technical debt.

  1. Factor out the enums and string constants into the base XMLHttpRequest class.
  2. Add a few helper methods to make it easier to compare, loop through, and get the string representation of an event type.
  3. Use stronger typing on a couple of methods to ensure they only get the types of events they expect.

This will also make the final code a bit more readable and easier to alter in bugs like bug 1842970, as well as making it trivial to print actual event names rather than enum integers in our debug logs.

Severity: -- → N/A
Type: defect → task
Assignee: nobody → twisniewski
Status: NEW → ASSIGNED
Blocks: 1842970
No longer blocks: xhr
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: