[Bug 20322] Document the force preflight flag

https://www.w3.org/Bugs/Public/show_bug.cgi?id=20322

--- Comment #12 from Hallvord R. M. Steen <hsteen@mozilla.com> ---
> x.open("POST", "...")
> x.send("test")
> should not send a preflight and should not allow
> for late registration of upload event listeners.

> x.open("POST", "...")
> x.setRequestHeader("test", "test")
> x.send("test")
> should send a preflight and should probably allow
> for late registration of upload event listeners therefore.

Anne, I can see the logic - sort of - but I think the usability of this is
going to suck. What you're suggesting is to introduce some secret state in the
API which the JS author can't inspect or know about ('force_preflight') that
will depend on side effects of whether specific methods like setRequestHeader()
were called with specific arguments - and this secret state will determine
whether my upload event listeners fire?

Are you really, really sure?

Because it sure seems like a much simpler option to just say "OK, you want to
listen to upload events? Righty, doing that will take a preflight request but
the events you expect will fire". That to some extent goes against the norm
that adding event listeners should not have side effects - but the API seems
much more usable that way.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 19 November 2013 11:11:26 UTC