250+ TOP MCQs on HTML Plugins and Answers

HTML written test Questions & Answers focuses on “HTML Plugins”.

1. Which of the following is not a transmission mode that plug-in can select?
a) File mode
b) Random-access mode
c) Normal mode
d) Complex mode

Answer: d
Clarification: There are three transmission modes that plug-in can select. In normal mode browser sends stream data sequentially to plug-in, in Random-access mode browser allows a plug-in to request specific ranges of bytes from anywhere in the stream. In File, mode browser saves data to a local file in cache and passes the file path to plug-in.

2. Which method is used for sending data to URL from memory buffer?
a) NPN_PostURL
b) NPN_GetURLNotify
c) NPN_GetURL
d) NPN_PostURLNotify

Answer: a
Clarification: For sending data to URL from file or a memory buffer we used NPN_PostURL. The result obtains from a server can also be sent to a particular browser window or frame for display, or delivered to a plug-in instance in the new stream.

3. Which of the following request is used for the browser to load a URL?
a) NPN_GetURL
b) NPN_PostURL
c) NPN_PostURLNotify
d) NPN_GetURLNotify

Answer: a
Clarification: NPN_GetURL is a request for the browser to load a URL into a particular frame for display or browser window, or for delivering data of that URL to the plug-in instance in a new stream. NPN_PostURLNotify function notifies plug-in of a result when an operation completes.

4. Which function helps in identifying compatibility of plug-in and browser?
a) NPN_UserAgent
b) NPN_Version
c) NPN_Status
d) NPN_GetValue

Answer: b
Clarification: For determining whether plug-in and browser versions are compatible or not we use NPN_Version method It also provides alternative processing for different versions. For checking changes in major and minor version numbers it can also be used.

  250+ TOP MCQs on Choosing Editors and IDEs and Answers

5. Which method is used to display a message on the status line?
a) NPN_MemFree
b) NPN_HandleWindow
c) NPN_Status
d) NPN_GetValue

Answer: c
Clarification: NPN_Status is used to display a message on the status line. It makes the user feel that the plug-in is a part of the browser user interface, plug-in can emulate browser behavior by providing status line message.

6. Which of the following is called after plug-in is initialized to get scripting interface?
a) NPP_GetValue
b) NP_GetValue
c) NP_GetMIMEDescription
d) NP_Initialize

Answer: a
Clarification: After the plug-in is initialized to get scripting interface NPP_GetValue is called. NP_GetValue is called during initialization to retrieve plug-in’s description and name, that will appear in navigator.plugins DOM object and is used to populate about:plugins.

7. The plugin resource string 1 is associated with ________
a) MIME type
b) aiff
c) video
d) jpg

Answer: c
Clarification: There are plugin resources. ‘STR#’ 1 is associated with video or quicktime, MIME type is associated with str 128, aiff is associated with string 4, jpg is associated with string 6, image or jpeg is associated with string 5.

8. Windowless plug-in will not call ____________
a) NPN_InvalidateRegion
b) NPN_ForceRedraw
c) NPN_InvalidateRect
d) NPP_GetValue

Answer: d
Clarification: Windowless plugin can call Netscape methods like NPN_InvalidateRegion, NPN_ForceRedraw, NPN_InvalidateRect. NPN_InvalidateRegion is used for invalidate an area in windowless plug-in before refreshing or repeating.

9. The browser will not call the plug-in _________
a) NPN_InvalidateRect
b) NPP_Print
c) NPP_HandleEvent
d) NPP_SetValue

Answer: a
Clarification: Browser calls various plug-in methods like NPP_Print, NPP_SetWindow, NPP_SetValue, NPP_HandleEvent, NPP_GetValue. NPP_SetValue is for setting the browser information, for delivering platform-specific event to instance browser calls NPP_HandleEvent method.

  250+ TOP MCQs on Optimization of Images and Answers

10. Which of the following method is not associated to handling the memory ________________
a) NPN_MemFlush
b) NPN_MemAlloc
c) NPN_MemFree
d) NPP_HandleEvent

Answer: d
Clarification: There are three methods used in memory handling in plug-ins. NPN_MemFree method is used to free memory allocated. NPN_MemAlloc method is used to allocate memory from the browser. NPN_MemFlush is used to free memory in Mac OS only.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top