Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages
Filter by Categories
nmims post
Objective Type Set
Online MCQ Assignment
Question Solution
Solved Question
Uncategorized

1. Which one of the following is an open source JavaScript library that enables styling for HTML5 elements in versions of Internet Explorer before IE 9 ?
a) HTML5
b) HTML5 Shiv
c) HTML5 Shim
d) None of the mentioned

View Answer

Answer: b [Reason:] HTML5 Shiv is a JavaScript workaround, invented by Sjoerd Visscher, to enable styling of HTML5 elements in versions of Internet Explorer prior to version 9, which do not allow unknown elements to be styled without JavaScript.

2. Which one of the following is not a step to install a library you need to perform the compatibility in browsers ?
a) Download the library from the github location
b) Uncompress the file
c) Insert the following code inside the head tag
d) None of the mentioned

View Answer

Answer: d [Reason:] All steps are required.

3. Which property is used to detect the browser’s user agent and code based on the pertinent cases?
a) navigator.userAgent
b) navigator.user
c) navigator
d) return

View Answer

Answer: a [Reason:] An old strategy was to look at the property navigator.userAgent to detect the browser’s user agent and code based on the pertinent cases.

4. Some users have requested tests for IE’s float double margin bug, and support for position:fixed. Which API is suitable for them?
a) mq() media Plugin API
b) addTest() Plugin API
c) testAllProps() Plugin API
d) none of the mentioned

View Answer

Answer: b [Reason:] A custom plug-in uses code that you write and attach to a load test or a Web performance test.

5. ___________ is an open source JavaScript library that allows support for different levels of experiences based on the capabilities of each browser.
a) Navigator
b) Modernizr
c) Geolocation
d) Google API

View Answer

Answer: b [Reason:] Modernizr is an open source JavaScript library that allows support for different levels of experiences based on the capabilities of each browser using a simple feature detection model.

6. ____________ allows you to add custom styles to the document and test an element afterwards.
a) hasEvent()
b) testAllProps()
c) testProp()
d) modernizr.testStyles()

View Answer

Answer: d [Reason:] Modernizr.testStyles() allows you to add custom styles to the document and test an element afterwards. An element with the id of “modernizr” is injected into the page.

7. Modernizr does actually add missing functionalities to browsers save for the HTML5 tags styling support.
a) True
b) False

View Answer

Answer: b [Reason:] Modernizr, in spite of its name, does not actually add missing functionalities to browsers save for the HTML5 tags styling support.

8. ___________ is used to test whether geolocation is supported in old browsers.
a) Modernizr
b) Modernizr.geolocation
c) Navigator.userAgent
d) Modernizr.js

View Answer

Answer: c [Reason:] Since Modernizr is a JavaScript object with methods, we can use Modernizr.geolocation to test whether geolocation is supported.

9. ____________ is a resource loader (CSS and JavaScript) that was made to specifically to work side-by-side with Modernizr.
a) HasEvent()
b) Navigator.userAgent
c) Modernizr.load
d) None of the mentioned

View Answer

Answer: c [Reason:] Modernizr.load is optional in your build, but if you are loading polyfills, there’s a good chance it can save you some bandwidth and boost performance a bit.

10. In case we want to implement a JavaScript fallback, we would need to create a conditional statement using Modernizr.
a) True
b) False

View Answer

Answer: a [Reason:] Modernizr is a JavaScript library that detects which HTML5 and CSS3 features your visitor’s browser supports.