isSupported method
9 | ||||
Returns whether the specified DOM module and version is supported by the current node.
To detect whether a DOM module and version is implemented by the browser, use the hasFeature method.
Syntax:
You can find the related objects in the Supported by objects section below.
Parameters:
Required. String that specifies the name of the feature. This parameter is case-insensitive.
Some of the possible values:
|
|||||||||||||||||||||||
Required in Firefox and Opera, optional in Google Chrome and Safari. String that specifies the version number (such as '1.0'). |
Return value:
Boolean. One of the following values:
Not supported. | |
Supported. |
Example HTML code 1:
This example illustrates the use of the isSupported method:
|
||||
<head> <script type="text/javascript"> if (document.isSupported) { if (document.isSupported ("HTML","2.0")) alert ("HTML 2.0 is supported by this browser"); else alert ("HTML 2.0 is not supported by this browser"); } </script> </head> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
attribute, CommentNode, doctype, document, DocumentFragment, TextNode, XMLDocument
HTML elements:
a, abbr, acronym, address, applet, area, b, base, basefont, bdo, bgsound, big, blink, blockquote, body, br, button, caption, center, cite, code, col, colgroup, comment, dd, del, dfn, dir, div, dl, dt, em, embed, fieldset, font, form, frame, frameset, h1, h2, h3, h4, h5, h6, head, hr, html, i, iframe, img, input:button, input:checkbox, input:file, input:hidden, input:image, input:password, input:radio, input:range, input:reset, input:search, input:submit, input:text, ins, isindex, kbd, keygen, label, legend, li, link, listing, map, marquee, menu, meta, nobr, noframes, noscript, object, ol, optgroup, option, p, param, plaintext, pre, q, rt, ruby, s, samp, script, select, small, span, strike, strong, style, sub, sup, table, tbody, td, textarea, tfoot, th, thead, title, tr, tt, u, ul, var, wbr, xml, xmp
Related pages:
External links:
User Contributed Comments