[Webkit-unassigned] [Bug 43400] Add priority attribute to XMLHttpRequest

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 15 07:23:02 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=43400


Olli Pettay (:smaug) <Olli.Pettay at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Olli.Pettay at gmail.com




--- Comment #30 from Olli Pettay (:smaug) <Olli.Pettay at gmail.com>  2011-03-15 07:23:02 PST ---
What is the state of this bug?
I was thinking to update 
https://bugzilla.mozilla.org/show_bug.cgi?id=559092
but before doing that we should agree what the API should look like.

In my patch I was using consts, you're using string, although
internally those are just converted to consts.
I think we could just allow any
priority between some minimum (0?) and max(100?) and then
it is up to the implementation to use those values as hints.
Having numbers makes it easier to increase and decrease the values.
(Mozilla's implementation does allow changing priority while the
XHR is processing the request. It is then up to the network layer to
handle that change.)

So the API could be for example
XMLHttpRequest {
...
  const unsigned short LOW_PRIORITY = 0;
  const unsigned short HIGH_PRIORITY = 100;

  // when setting the value, if bigger than HIGH_PRIORITY
  // priorityHint is set to HIGH_PRIORITY.
  unsigned short priorityHint; 

}


Also, seems like your setPriority may throw an exception.
The patch for Mozilla doesn't do that.

And as Anne says, .priority should be prefixed.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list