PrepAway - Latest Free Exam Questions & Answers

Which line of code should you insert at line 03?

You are developing a web page that enables customers to upload documents to a web server.
The page includes an HTML5 PROGRESS element named progressBar that displays information about the status of the upload.
The page includes the following code. (Line numbersare included for reference only.)

An event handler must be attached to the request object to update the PROGRESS element on the page.
You need to ensure that the status of the upload isdisplayed in the progress bar.
Which line of code should you insert at line 03?

PrepAway - Latest Free Exam Questions & Answers

A.
xhr.upload.onloadeddata =

B.
xhr.upload.onplaying =

C.
xhr.upload.onseeking =

D.
xhr.upload.onprogress =

2 Comments on “Which line of code should you insert at line 03?

  1. Neto says:

    D. onprogress

    The following event handlers are supported for XMLHttpRequest and XMLHttpRequestUpload objects:

    onloadstart – the request starts
    onprogress – transmitting data
    onabort – request has been aborted
    onerror – the request has failed
    onload – the request has successfully completed
    ontimeout – the timeout has passed before the request completed
    onloadend – the request has completed




    0



    0

Leave a Reply