Test Series - html

Test Number 60/72

Q: 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
Solution: 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.
Q: Which method is used for sending data to URL from memory buffer?
A. NPN_PostURL
B. NPN_GetURLNotify
C. NPN_GetURL
D. NPN_PostURLNotify
Solution: 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.
Q: 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
Solution: 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.
Q: Which function helps in identifying compatibility of plug-in and browser?
A. NPN_UserAgent
B. NPN_Version
C. NPN_Status
D. NPN_GetValue
Solution: 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.
Q: Which method is used to display a message on the status line?
A. NPN_MemFree
B. NPN_HandleWindow
C. NPN_Status
D. NPN_GetValue
Solution: 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.
Q: 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
Solution: 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.
Q: The plugin resource string 1 is associated with ________
A. MIME type
B. aiff
C. video
D. jpg
Solution: 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.
Q: Windowless plug-in will not call ____________
A. NPN_InvalidateRegion
B. NPN_ForceRedraw
C. NPN_InvalidateRect
D. NPP_GetValue
Solution: 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.
Q: The browser will not call the plug-in _________
A. NPN_InvalidateRect
B. NPP_Print
C. NPP_HandleEvent
D. NPP_SetValue
Solution: 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.
Q: Which of the following method is not associated to handling the memory ________________
A. NPN_MemFlush
B. NPN_MemAlloc
C. NPN_MemFree
D. NPP_HandleEvent
Solution: 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.

You Have Score    /10