PrepAway - Latest Free Exam Questions & Answers

What should you do to make sure that the Expire method of Certkiller Form is called when the JavaScript functi

You are busy to develop a Microsoft Windows Forms exam delivery application. This is going to be used to access the content of the exam via the Internet. A WebBrowser named testbrowser is added to the control to a form named Certkiller Form, which is define as follows:

[PermissionSet[SecurityAction.Demand, Name=”FullTrust”]] [System.Runtime.InteropServices.ComVisible[true]]
public Certkiller Form : Form
{
public Certkiller Form[]
{
InitializeComponent[];
}
public void Expire[]
{
}
}
The JavaScript-based timer that is used by the Web site for the exam has a function to inform the exam delivery application when the time has expired for the exam, which is the following:
window.external.Expire[];

What should you do to make sure that the Expire method of Certkiller Form is called when the JavaScript function is carry out?

PrepAway - Latest Free Exam Questions & Answers

A.
You should set the Document.DomDocument property of the browser instance to the current instance of the Certkiller Form class.

B.
You should set the ObjectForScripting property of the browser instance to the current instance of the Certkiller Form class.

C.
You should call the AttachEventHandler of the Document property of the browser instance.

D.
You should call the ExecCommand method of the Document property of the browser instance.

Explanation:
You must set the ObjectForScripting for the browser instance to the current instance of the Certkiller Form class.
Incorrect Answers:
A: The property of the Document.DomDocument represents the true DOM object of an HTML document.
C: The AttachEventHandler allows you to attach a HTML Document Object Model event to an event handler.
D: The ExecCommand method allows you to execute commands against DOM documents.


Leave a Reply