Magento
M70-301 · Question #32
Which of the following functions is guaranteed to be executed after the DOM is ready? (Assume that the page only includes the prototype.js library.)
The correct answer is D. document.observe( "dom:loaded", function(). . . }). See the full explanation below for the reasoning.
Question
Which of the following functions is guaranteed to be executed after the DOM is ready? (Assume that the page only includes the prototype.js library.)
Options
- A$(function() { . . . })
- B$(documerit).ready(function() { . . . })
- C$("dom:loaded", function(). . . })
- Ddocument.observe( "dom:loaded", function(). . . })
- Edocument.observe("html:loaded", function(). . . })
- Fdocument.event("html:load", function(). . . })
How the community answered
(55 responses)- B5% (3)
- C11% (6)
- D78% (43)
- E4% (2)
- F2% (1)
Community Discussion
No community discussion yet for this question.