nerdexam
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)
  • B
    5% (3)
  • C
    11% (6)
  • D
    78% (43)
  • E
    4% (2)
  • F
    2% (1)

Community Discussion

No community discussion yet for this question.

Full M70-301 Practice