Document Object Model And Event Handling - Study Mode

[#66] Which of the following are the drag and drop events?
Correct Answer

(C) both drop and dragstart

Explanation

Solution: The API defines the following seven event types : 1. dragstart 2. drag 3. dragend 4. dragenter 5. dragover 6. dragleave 7. drop

[#67] Which property holds a DataTransfer object that contains information about the data being transferred and the formats in whichh it is available?
Correct Answer

(A) dataTransfer

Explanation

Solution: The property, dataTransfer, holds a DataTransfer object that contains information about the data being transferred and the formats in which it is available.

[#68] Which API allows scripts in a document from one server to exchange messages with scripts?
Correct Answer

(A) Cross-Document Messaging API

Explanation

Solution: The Cross-Document Messaging API allows scripts in a document from one server to exchange messages with scripts in a document from another server. This works around the limitations of the same-origin policy in a secure way. Each message that is sent triggers a message event on the Window of the receiving document.

[#69] Which property helps to initiate the HTTP requests?
Correct Answer

(B) location

Explanation

Solution: It is possible for JavaScript code to script HTTP, however. HTTP requests are initiated when a script sets the location property of a window object or calls the submit() method of a form object. In both cases, the browser loads a new page.

[#70] Which method is an alternative of the property location of a window object?
Correct Answer

(A) submit()

Explanation

Solution: It is possible for JavaScript code to script HTTP, however. HTTP requests are initiated when a script sets the location property of a window object or calls the submit() method of a form object. In both cases, the browser loads a new page.