This set of HTML written test Questions & Answers focuses on “HTML Plugins – 2”.
a) File mode
b) Random-access mode
c) Normal mode
d) Complex mode
Explanation: 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?
Explanation: 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?
Explanation: 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?
Explanation: 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.
Explanation: 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?
Explanation: 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
Explanation: 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 ____________
Explanation: 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.
Explanation: 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.
10. Which of the following method is not associated to handling the memory ________________
Explanation: 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.
Sanfoundry Global Education & Learning Series – HTML.
To practice all written questions on HTML, here is complete set of 1000+ Multiple Choice Questions and Answers.