New issue
Advanced search Search tips

Issue 828727 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Apr 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

XMLHttpRequest Error events seem to have the wrong Prototype

Reported by machtin....@gmail.com, Apr 4 2018

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36

Steps to reproduce the problem:
Do an instanceof test on an event emitted by XMLHttpRequest.onerror

What is the expected behavior?
I expect "error instanceof ErrorEvent" to be true, as well as error.__proto__ to be "ErrorEvent".

What went wrong?
"error instanceof ErrorEvent" yields false. error.__proto__ gives me "ProgressEvent"

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 64.0.3282.186  Channel: stable
OS Version: 
Flash Version: Shockwave Flash 29.0 r0

Also applies to firefox.
 
xmlhttprequest-onerror-bug.html
406 bytes View Download

Comment 1 by woxxom@gmail.com, Apr 4 2018

The observed behavior is correct as per the spec:
https://xhr.spec.whatwg.org/#event-xhr-error

	readystatechange  Event        
	loadstart         ProgressEvent
	progress          ProgressEvent
	abort             ProgressEvent
	error             ProgressEvent
	load              ProgressEvent
	timeout           ProgressEvent
	loadend           ProgressEvent

Comment 2 by tkent@chromium.org, Apr 4 2018

Components: Blink>Network>XHR
Labels: Needs-Milestone
Status: WontFix (was: Unconfirmed)

Sign in to add a comment