Browser Feature Detection

  • Revision slug: Browser_Feature_Detection
  • Revision title: Browser Feature Detection
  • Revision id: 165030
  • Created:
  • Creator: George3
  • Is current revision? No
  • Comment /* Test Summary */ Converted HTML table to Wiki table

Revision Content

Summary: An experimental approach to discovering degree of support for Standards Among the methods of browser detection, many people recommend using the existence of specific properties or methods in a browser's DOM to detect the browser type and whether it supports a given operation. This test takes that idea to the extreme and tests a large number of properties and methods to determine the level of support a browser has for particular standards and reports a rating as the percentage of names the browser defines.

Browser Sniffing via API Name Detection

The following tables list the API names defined for specific W3C DOM APIs and lists the percentage of names that your browser actually defines followed by a list of each of the API names tested along with an indication of whether the name was defined for your browser.

It is clear from these test results that Netscape 7.0x and Mozilla Firefox have the greatest DOM support although Internet Explorer, Safari, and Opera have sufficient DOM CSS 1 and DOM Level 1 & 2 document property and method support to enable cross browser web development.

Test Summary

Standard Netscape 7.0x Firefox 1.5 Safari 2 Opera 7 / 8.5-9.0 Internet
Explorer 6 / 7
DOM Core 1 100%100%100%75% / 91%75% / 75%
DOM Core 2 100% 100% 100% 70% / 94% 58% / 58%
DOM 1 HTML 100% 100% 100% 100% / 100% 100% / 100%
DOM CSS 1 100% 100% 100% 100% / 100% 96% / 96%
DOM CSS 2 100% 98% 67% 71% / 83% 38% / 42%

Test Results Cross Reference

DOM Core Level 1

Support for properties/methods in document

name Firefox 1.5 IE 6 & 7 Opera 8.54 - 9.01
doctypetruetruetrue
implementationtruetruetrue
documentElementtruetruetrue
createElementtruetruetrue
createDocumentFragmenttruetruetrue
createTextNodetruetruetrue
createCommenttruetruetrue
createCDATASectiontruefalsetrue
createProcessingInstructiontruefalsetrue
createAttributetruetruetrue
createEntityReferencetruefalsefalse
getElementsByTagNametruetruetrue


DOM Core Level 2

Support for properties/methods in document

name Firefox 1.5 IE 6 & 7 Opera 8.54 - 9.01
doctypetruetruetrue
implementationtruetruetrue
documentElementtruetruetrue
createElementtruetruetrue
createDocumentFragmenttruetruetrue
createTextNodetruetruetrue
createCommenttruetruetrue
createCDATASectiontruefalsetrue
createProcessingInstructiontruefalsetrue
createAttributetruetruetrue
createEntityReferencetruefalsefalse
getElementsByTagNametruetruetrue
importNodetruefalsetrue
createElementNStruefalsetrue
createAttributeNStruefalsetrue
getElementsByTagNameNStruefalsetrue
getElementByIdtruetruetrue


DOM Level 1 HTML

Support for properties/methods in document

name Firefox 1.5 IE 6 & 7 Opera 8.54 - 9.01
documentElementtruetruetrue
createElementtruetruetrue
createDocumentFragmenttruetruetrue
createTextNodetruetruetrue
createCommenttruetruetrue
createAttributetruetruetrue
getElementsByTagNametruetruetrue
titletruetruetrue
referrertruetruetrue
domaintruetruetrue
URLtruetruetrue
bodytruetruetrue
imagestruetruetrue
appletstruetruetrue
linkstruetruetrue
formstruetruetrue
anchorstruetruetrue
cookietruetruetrue
opentruetruetrue
closetruetruetrue
writetruetruetrue
writelntruetruetrue
getElementByIdtruetruetrue
getElementsByNametruetruetrue


DOM CSS 1

Support for properties/methods in document.body.style

name Firefox 1.5 IE 6 & 7 Opera 8.54 - 9.01
backgroundtruetruetrue
backgroundAttachmenttruetruetrue
backgroundColortruetruetrue
backgroundImagetruetruetrue
backgroundRepeattruetruetrue
bordertruetruetrue
borderSpacingtruefalsetrue
borderStyletruetruetrue
borderToptruetruetrue
borderRighttruetruetrue
borderBottomtruetruetrue
borderLefttruetruetrue
borderTopWidthtruetruetrue
borderRightWidthtruetruetrue
borderBottomWidthtruetruetrue
borderLeftWidthtruetruetrue
borderWidthtruetruetrue
cleartruetruetrue
colortruetruetrue
displaytruetruetrue
cssFloattruefalsetrue
fonttruetruetrue
fontFamilytruetruetrue
fontSizetruetruetrue
fontStyletruetruetrue
fontVarianttruetruetrue
fontWeighttruetruetrue
heighttruetruetrue
letterSpacingtruetruetrue
lineHeighttruetruetrue
listStyletruetruetrue
listStyleImagetruetruetrue
listStylePositiontruetruetrue
listStyleTypetruetruetrue
margintruetruetrue
marginToptruetruetrue
marginRighttruetruetrue
marginBottomtruetruetrue
marginLefttruetruetrue
paddingtruetruetrue
paddingToptruetruetrue
paddingRighttruetruetrue
paddingBottomtruetruetrue
paddingLefttruetruetrue
textAligntruetruetrue
textDecorationtruetruetrue
textIndenttruetruetrue
textTransformtruetruetrue
verticalAligntruetruetrue
whiteSpacetruetruetrue
widthtruetruetrue
wordSpacingtruetruetrue


DOM CSS 2

Support for properties/methods in document.body.style</caption>

name Firefox 1.5 IE 6 & 7 Opera 8.54 - 9.01
azimuthtruefalsefalse
backgroundPositiontruetruetrue
borderCollapsetruetruetrue
borderSpacingtruefalsetrue
borderTopColortruetruetrue
borderRightColortruetruetrue
borderBottomColortruetruetrue
borderLeftColortruetruetrue
borderTopStyletruetruetrue
borderRightStyletruetruetrue
borderBottomStyletruetruetrue
borderLeftStyletruetruetrue
bottomtruetruetrue
captionSidetruefalsetrue
cleartruetruetrue
cliptruetruetrue
contenttruefalsetrue
counterIncrementtruefalsetrue
counterResettruefalsetrue
cuetruefalsefalse
cueAftertruefalsefalse
cueBeforetruefalsefalse
cursortruetruetrue
directiontruetruetrue
elevationtruefalsefalse
emptyCellstruefalsetrue
fontSizeAdjusttruefalsetrue
fontStretchtruefalsetrue
lefttruetruetrue
markerOffsettruefalsetrue
markstruefalsetrue
maxHeighttrueie7 onlytrue
maxWidthtrueie7 onlytrue
minHeighttruetruetrue
minWidthtrueie7 onlytrue
orphanstruefalsetrue
outlinetruefalsetrue
outlineColortruefalsetrue
outlineStyletruefalsetrue
outlineWidthtruefalsetrue
overflowtruetruetrue
pagetruefalsetrue
pageBreakAftertruetruetrue
pageBreakBeforetruetruetrue
pageBreakInsidetruefalsetrue
pausetruefalsetrue
pauseAftertruefalsetrue
pauseBeforetruefalsetrue
pitchtruefalsefalse
pitchRangetruefalsetrue
playDuringfalsefalsefalse
positiontruetruetrue
quotestruefalsetrue
richnesstruefalsefalse
righttruetruetrue
sizetruefalsetrue
speaktruefalsetrue
speakHeadertruefalsefalse
speakNumeraltruefalsefalse
speakPunctuationtruefalsefalse
speechRatetruefalsetrue
stresstruefalsefalse
tableLayouttruetruetrue
textShadowtruefalsetrue
toptruetruetrue
unicodeBiditruetruetrue
visibilitytruetruetrue
voiceFamilytruefalsetrue
volumetruefalsetrue
widowstruefalsetrue
zIndextruetruetrue


Test Code

<script type="text/javascript">
<!-- 

// document properties that are used to determine
// support levels
var _FEATURES = 
{
	'DOMCORE1': [ 
		{name: 'doctype', 'supported': false},
		{name: 'implementation', 'supported': false},
		{name: 'documentElement', 'supported': false},
		{name: 'createElement', 'supported': false},
		{name: 'createDocumentFragment', 'supported': false},
		{name: 'createTextNode', 'supported': false},
		{name: 'createComment', 'supported': false},
		{name: 'createCDATASection', 'supported': false},
		{name: 'createProcessingInstruction', 'supported': false},
		{name: 'createAttribute', 'supported': false},
		{name: 'createEntityReference', 'supported': false},
		{name: 'getElementsByTagName',  'supported': false}
	],
	
	'DOMHTML': [ 
		{name: 'documentElement', 'supported': false},
		{name: 'createElement', 'supported': false},
		{name: 'createDocumentFragment', 'supported': false},
		{name: 'createTextNode', 'supported': false},
		{name: 'createComment', 'supported': false},
		{name: 'createAttribute', 'supported': false},
		{name: 'getElementsByTagName',  'supported': false},
		{name: 'title', 'supported': false},
		{name: 'referrer', 'supported': false},
		{name: 'domain', 'supported': false},
		{name: 'URL', 'supported': false},
		{name: 'body', 'supported': false},
		{name: 'images', 'supported': false},
		{name: 'applets', 'supported': false},
		{name: 'links', 'supported': false},
		{name: 'forms', 'supported': false},
		{name: 'anchors', 'supported': false},
		{name: 'cookie', 'supported': false},
		{name: 'open', 'supported': false},
		{name: 'close', 'supported': false},
		{name: 'write', 'supported': false},
		{name: 'writeln', 'supported': false},
		{name: 'getElementById', 'supported': false},
		{name: 'getElementsByName', 'supported': false}
	],

	'DOMCORE2': [ 
		{name: 'doctype', 'supported': false},
		{name: 'implementation', 'supported': false},
		{name: 'documentElement', 'supported': false},
		{name: 'createElement', 'supported': false},
		{name: 'createDocumentFragment', 'supported': false},
		{name: 'createTextNode', 'supported': false},
		{name: 'createComment', 'supported': false},
		{name: 'createCDATASection', 'supported': false},
		{name: 'createProcessingInstruction', 'supported': false},
		{name: 'createAttribute', 'supported': false},
		{name: 'createEntityReference', 'supported': false},
		{name: 'getElementsByTagName',  'supported': false},
		{name: 'importNode', 'supported': false},
		{name: 'createElementNS', 'supported': false},
		{name: 'createAttributeNS', 'supported': false},
		{name: 'getElementsByTagNameNS', 'supported': false},
		{name: 'getElementById', 'supported': false}
	],

	'DOMCSS1': [
		{name: 'background', 'supported': false},
		{name: 'backgroundAttachment', 'supported': false},
		{name: 'backgroundColor', 'supported': false},
		{name: 'backgroundImage', 'supported': false},
		{name: 'backgroundRepeat', 'supported': false},
		{name: 'border', 'supported': false},
		{name: 'borderSpacing', 'supported': false},
		{name: 'borderStyle', 'supported': false},
		{name: 'borderTop', 'supported': false},
		{name: 'borderRight', 'supported': false},
		{name: 'borderBottom', 'supported': false},
		{name: 'borderLeft', 'supported': false},
		{name: 'borderTopWidth', 'supported': false},
		{name: 'borderRightWidth', 'supported': false},
		{name: 'borderBottomWidth', 'supported': false},
		{name: 'borderLeftWidth', 'supported': false},
		{name: 'borderWidth', 'supported': false},
		{name: 'clear', 'supported': false},
		{name: 'color', 'supported': false},
		{name: 'display', 'supported': false},
		{name: 'cssFloat', 'supported': false},
		{name: 'font', 'supported': false},
		{name: 'fontFamily', 'supported': false},
		{name: 'fontSize', 'supported': false},
		{name: 'fontStyle', 'supported': false},
		{name: 'fontVariant', 'supported': false},
		{name: 'fontWeight', 'supported': false},
		{name: 'height', 'supported': false},
		{name: 'letterSpacing', 'supported': false},
		{name: 'lineHeight', 'supported': false},
		{name: 'listStyle', 'supported': false},
		{name: 'listStyleImage', 'supported': false},
		{name: 'listStylePosition', 'supported': false},
		{name: 'listStyleType', 'supported': false},
		{name: 'margin', 'supported': false},
		{name: 'marginTop', 'supported': false},
		{name: 'marginRight', 'supported': false},
		{name: 'marginBottom', 'supported': false},
		{name: 'marginLeft', 'supported': false},
		{name: 'padding', 'supported': false},
		{name: 'paddingTop', 'supported': false},
		{name: 'paddingRight', 'supported': false},
		{name: 'paddingBottom', 'supported': false},
		{name: 'paddingLeft', 'supported': false},
		{name: 'textAlign', 'supported': false},
		{name: 'textDecoration', 'supported': false},
		{name: 'textIndent', 'supported': false},
		{name: 'textTransform', 'supported': false},
		{name: 'verticalAlign', 'supported': false},
		{name: 'whiteSpace', 'supported': false},
		{name: 'width', 'supported': false},
		{name: 'wordSpacing', 'supported': false}
	],
	
	'DOMCSS2': [
		{name: 'azimuth', 'supported': false},
		{name: 'backgroundPosition', 'supported': false},
		{name: 'borderCollapse', 'supported': false},
		{name: 'borderSpacing', 'supported': false},
		{name: 'borderTopColor', 'supported': false},
		{name: 'borderRightColor', 'supported': false},
		{name: 'borderBottomColor', 'supported': false},
		{name: 'borderLeftColor', 'supported': false},
		{name: 'borderTopStyle', 'supported': false},
		{name: 'borderRightStyle', 'supported': false},
		{name: 'borderBottomStyle', 'supported': false},
		{name: 'borderLeftStyle', 'supported': false},
		{name: 'bottom', 'supported': false},
		{name: 'captionSide', 'supported': false},
		{name: 'clear', 'supported': false},
		{name: 'clip', 'supported': false},
		{name: 'content', 'supported': false},
		{name: 'counterIncrement', 'supported': false},
		{name: 'counterReset', 'supported': false},
		{name: 'cue', 'supported': false},
		{name: 'cueAfter', 'supported': false},
		{name: 'cueBefore', 'supported': false},
		{name: 'cursor', 'supported': false},
		{name: 'direction', 'supported': false},
		{name: 'elevation', 'supported': false},
		{name: 'emptyCells', 'supported': false},
		{name: 'fontSizeAdjust', 'supported': false},
		{name: 'fontStretch', 'supported': false},
		{name: 'left', 'supported': false},
		{name: 'markerOffset', 'supported': false},
		{name: 'marks', 'supported': false},
		{name: 'maxHeight', 'supported': false},
		{name: 'maxWidth', 'supported': false},
		{name: 'minHeight', 'supported': false},
		{name: 'minWidth', 'supported': false},
		{name: 'orphans', 'supported': false},
		{name: 'outline', 'supported': false},
		{name: 'outlineColor', 'supported': false},
		{name: 'outlineStyle', 'supported': false},
		{name: 'outlineWidth', 'supported': false},
		{name: 'overflow', 'supported': false},
		{name: 'page', 'supported': false},
		{name: 'pageBreakAfter', 'supported': false},
		{name: 'pageBreakBefore', 'supported': false},
		{name: 'pageBreakInside', 'supported': false},
		{name: 'pause', 'supported': false},
		{name: 'pauseAfter', 'supported': false},
		{name: 'pauseBefore', 'supported': false},
		{name: 'pitch', 'supported': false},
		{name: 'pitchRange', 'supported': false},
		{name: 'playDuring', 'supported': false},
		{name: 'position', 'supported': false},
		{name: 'quotes', 'supported': false},
		{name: 'richness', 'supported': false},
		{name: 'right', 'supported': false},
		{name: 'size', 'supported': false},
		{name: 'speak', 'supported': false},
		{name: 'speakHeader', 'supported': false},
		{name: 'speakNumeral', 'supported': false},
		{name: 'speakPunctuation', 'supported': false},
		{name: 'speechRate', 'supported': false},
		{name: 'stress', 'supported': false},
		{name: 'tableLayout', 'supported': false},
		{name: 'textShadow', 'supported': false},
		{name: 'top', 'supported': false},
		{name: 'unicodeBidi', 'supported': false},
		{name: 'visibility', 'supported': false},
		{name: 'voiceFamily', 'supported': false},
		{name: 'volume', 'supported': false},
		{name: 'widows', 'supported': false},
		{name: 'zIndex', 'supported': false}
	]
};

function supports(object, featureSet)
{
	var i;
	var features = _FEATURES[featureSet];
	var level = 0;
	
	if (!features)
		return level;
		
	for (i = 0; i < features.length; i++)
		if (typeof(object[features[i].name]) != 'undefined')
		{
			features[i].supported = true;
			++level;
		}

	return Math.floor( (100 *  level) / features.length );
}

function generateReport(object, featureSet, description)
{
	var i;
	var features = _FEATURES[featureSet];

	document.write('<p><b>' + featureSet + ' support for properties/methods in ' + description + ', percentage of names defined = ' + supports(object, featureSet) + '%<\/b><\/p>');

	document.write('<table cellspacing="0">');
	for (i = 0; i < features.length; i++) 
      {
		if (features[i].supported)
 		     document.write('<tr><td>' + features[i].name + '<\/td><td>' + features[i].supported + '<\/td><\/tr>');
		else
			document.write('<tr><td>' + features[i].name + '<\/td><td style="background-color:red">' + features[i].supported + '<\/td><\/tr>');
      }
	document.write('<\/table>');
}

var oldonerror = window.onerror; // suppress error messages...
window.onerror = null;
document.write('<p><b> Your browser ' + navigator.userAgent + '<\/b><\/p>');
generateReport(document,			'DOMCORE1', 'document');
generateReport(document,			'DOMCORE2', 'document');
generateReport(document,			'DOMHTML',  'document');
generateReport(document.body.style,	'DOMCSS1',  'document.body.style');
generateReport(document.body.style,	'DOMCSS2',  'document.body.style');
window.onerror = oldonerror;

//-->
</script>

See also

Original Document Information

  • Author(s): (Unknown)
  • Last Updated Date: Updated March 16, 2003
  • Copyright Information: Copyright © 2001-2003 Netscape.
  • Note: This reprinted article was originally part of the DevEdge site.

Revision Source

<p><span class="comment">Summary: An experimental approach to discovering degree of support for Standards</span>
Among the methods of <a href="en/Browser_Detection_and_Cross_Browser_Support">browser detection</a>, many people recommend using the existence of specific properties or methods in a browser's DOM to detect the browser type and whether it supports a given operation. This test takes that idea to the extreme and tests a large number of properties and methods to determine the level of support a browser has for particular standards and reports a rating as the percentage of names the browser defines.
</p>
<h3 name="Browser_Sniffing_via_API_Name_Detection"> Browser Sniffing via API Name Detection </h3>
<p>The following tables list the API names defined for specific W3C DOM APIs and lists the percentage of names that your browser actually defines followed by a list of each of the API names tested along with an indication of whether the name was defined for your browser.
</p><p>It is clear from these test results that Netscape 7.0x and Mozilla Firefox have the greatest DOM support although Internet Explorer, Safari, and Opera have sufficient DOM CSS 1 and DOM Level 1 &amp; 2 <code>document</code> property and method support to enable cross browser web development.
</p>
<h3 name="Test_Summary">Test Summary</h3>
<table class="standard-table">
<tbody><tr>
<th>Standard</th><th> Netscape 7.0x</th><th> Firefox 1.5</th><th> Safari 2</th><th> Opera 7 / 8.5-9.0</th><th> Internet<br>Explorer 6 / 7
</th></tr>
<tr>
<td><a class="external" href="http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html">DOM Core 1</a>
</td><td>100%</td><td>100%</td><td>100%</td><td>75% / 91%</td><td>75% / 75%
</td></tr>
<tr>
<td><a class="external" href="http://www.w3.org/TR/DOM-Level-2-Core/core.html">DOM Core 2</a>
</td><td>100%</td><td> 100%</td><td> 100%</td><td> 70% / 94%</td><td> 58% / 58%
</td></tr>
<tr>
<td><a class="external" href="http://www.w3.org/TR/REC-DOM-Level-1/level-one-html.html">DOM 1 HTML</a>
</td><td>100%</td><td> 100%</td><td> 100%</td><td> 100% / 100%</td><td> 100% / 100%
</td></tr>
<tr>
<td>DOM CSS 1
</td><td>100%</td><td> 100%</td><td> 100%</td><td> 100% / 100%</td><td> 96% / 96%
</td></tr>
<tr>
<td><a class="external" href="http://www.w3.org/TR/DOM-Level-2-Style/css.html">DOM CSS 2</a>
</td><td>100%</td><td> 98%</td><td> 67%</td><td> 71% / 83%</td><td> 38% / 42%
</td></tr></tbody></table>
<h3 name="Test_Results_Cross_Reference"> Test Results Cross Reference </h3>
<h4 name="DOM_Core_Level_1"> DOM Core Level 1 </h4>
<p><b>Support for properties/methods in <code>document</code></b>
</p>
<table class="standard-table">

<tbody><tr>
<td class="header">name
</td><td class="header">Firefox 1.5
</td><td class="header">IE 6 &amp; 7
</td><td class="header">Opera 8.54 - 9.01
</td></tr>

<tr>
<td><a href="en/DOM/document.doctype">doctype</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.implementation">implementation</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.documentElement">documentElement</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.createElement">createElement</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.createDocumentFragment">createDocumentFragment</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.createTextNode">createTextNode</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.createComment">createComment</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.createCDATASection">createCDATASection</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.createProcessingInstruction">createProcessingInstruction</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.createAttribute">createAttribute</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.createEntityReference">createEntityReference</a></td><td>true</td><td style="background-color:red">false</td><td style="background-color:red">false
</td></tr>
<tr>
<td><a href="en/DOM/document.getElementsByTagName">getElementsByTagName</a></td><td>true</td><td>true</td><td>true
</td></tr>
</tbody></table>
<p><br>
</p>
<h4 name="DOM_Core_Level_2"> DOM Core Level 2 </h4>
<p><b>Support for properties/methods in <code>document</code></b>
</p>
<table class="standard-table">

<tbody><tr>
<td class="header">name
</td><td class="header">Firefox 1.5
</td><td class="header">IE 6 &amp; 7
</td><td class="header">Opera 8.54 - 9.01
</td></tr>

<tr>
<td>doctype</td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td>implementation</td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td>documentElement</td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td>createElement</td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td>createDocumentFragment</td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td>createTextNode</td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td>createComment</td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td>createCDATASection</td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td>createProcessingInstruction</td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td>createAttribute</td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td>createEntityReference</td><td>true</td><td style="background-color:red">false</td><td style="background-color:red">false
</td></tr>
<tr>
<td>getElementsByTagName</td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.importNode">importNode</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.createElementNS">createElementNS</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.createAttributeNS">createAttributeNS</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.getElementsByTagNameNS">getElementsByTagNameNS</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.getElementById">getElementById</a></td><td>true</td><td>true</td><td>true
</td></tr>
</tbody></table>
<p><br>
</p>
<h4 name="DOM_Level_1_HTML"> DOM Level 1 HTML </h4>
<p><b>Support for properties/methods in <code>document</code></b>
</p>
<table class="standard-table">

<tbody><tr>
<td class="header">name
</td><td class="header">Firefox 1.5
</td><td class="header">IE 6 &amp; 7
</td><td class="header">Opera 8.54 - 9.01
</td></tr>

<tr>
<td>documentElement</td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td>createElement</td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td>createDocumentFragment</td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td>createTextNode</td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td>createComment</td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td>createAttribute</td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td>getElementsByTagName</td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.title">title</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.referrer">referrer</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.domain">domain</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.URL">URL</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.body">body</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.images">images</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.applets">applets</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.links">links</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.forms">forms</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.anchors">anchors</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.cookie">cookie</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.open">open</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.close">close</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.write">write</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.writeln">writeln</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td>getElementById</td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/DOM/document.getElementsByName">getElementsByName</a></td><td>true</td><td>true</td><td>true
</td></tr>
</tbody></table>
<p><br>
</p>
<h4 name="DOM_CSS_1"> DOM CSS 1 </h4>
<p><b>Support for properties/methods in <code>document.body.style</code></b>
</p>
<table class="standard-table">

<tbody><tr>
<td class="header">name
</td><td class="header">Firefox 1.5
</td><td class="header">IE 6 &amp; 7
</td><td class="header">Opera 8.54 - 9.01
</td></tr>

<tr>
<td><a href="en/CSS/background">background</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/background-attachment">backgroundAttachment</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/background-color">backgroundColor</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/background-image">backgroundImage</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/background-repeat">backgroundRepeat</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/border">border</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/border-spacing">borderSpacing</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/border-style">borderStyle</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/border-top">borderTop</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/border-right">borderRight</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/border-bottom">borderBottom</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/border-left">borderLeft</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/border-top-width">borderTopWidth</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/border-right-width">borderRightWidth</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/border-bottom-width">borderBottomWidth</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/border-left-width">borderLeftWidth</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/border-width">borderWidth</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/clear">clear</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/color">color</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/display">display</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/float">cssFloat</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/font">font</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/font-family">fontFamily</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/font-size">fontSize</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/font-style">fontStyle</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/font-variant">fontVariant</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/font-weight">fontWeight</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/height">height</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/letter-spacing">letterSpacing</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/line-height">lineHeight</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/list-style">listStyle</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/list-style-image">listStyleImage</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/list-style-position">listStylePosition</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/list-style-type">listStyleType</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/margin">margin</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/margin-top">marginTop</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/margin-right">marginRight</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/margin-bottom">marginBottom</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/margin-left">marginLeft</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/padding">padding</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/padding-top">paddingTop</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/padding-right">paddingRight</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/padding-bottom">paddingBottom</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/padding-left">paddingLeft</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/text-align">textAlign</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/text-decoration">textDecoration</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/text-indent">textIndent</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/text-transform">textTransform</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/vertical-align">verticalAlign</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/white-space">whiteSpace</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/width">width</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/word-spacing">wordSpacing</a></td><td>true</td><td>true</td><td>true
</td></tr>
</tbody></table>
<p><br>
</p>
<h4 name="DOM_CSS_2"> DOM CSS 2 </h4>
<p><b>Support for properties/methods in <code>document.body.style</code>&lt;/caption&gt;</b>
</p>
<table class="standard-table">

<tbody><tr>
<td class="header">name
</td><td class="header">Firefox 1.5
</td><td class="header">IE 6 &amp; 7
</td><td class="header">Opera 8.54 - 9.01
</td></tr>

<tr>
<td><a href="en/CSS/azimuth">azimuth</a></td><td>true</td><td style="background-color:red">false</td><td style="background-color:red">false
</td></tr>
<tr>
<td><a href="en/CSS/background-position">backgroundPosition</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/border-collapse">borderCollapse</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td>borderSpacing</td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/border-top-color">borderTopColor</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/border-right-color">borderRightColor</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/border-bottom-color">borderBottomColor</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/border-left-color">borderLeftColor</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/border-top-style">borderTopStyle</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/border-right-style">borderRightStyle</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/border-bottom-style">borderBottomStyle</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/border-left-style">borderLeftStyle</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/bottom">bottom</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/caption-side">captionSide</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td>clear</td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/clip">clip</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/content">content</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/counter-increment">counterIncrement</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/counter-reset">counterReset</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/cue">cue</a></td><td>true</td><td style="background-color:red">false</td><td style="background-color:red">false
</td></tr>
<tr>
<td><a href="en/CSS/cue-after">cueAfter</a></td><td>true</td><td style="background-color:red">false</td><td style="background-color:red">false
</td></tr>
<tr>
<td><a href="en/CSS/cue-before">cueBefore</a></td><td>true</td><td style="background-color:red">false</td><td style="background-color:red">false
</td></tr>
<tr>
<td><a href="en/CSS/cursor">cursor</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/direction">direction</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/elevation">elevation</a></td><td>true</td><td style="background-color:red">false</td><td style="background-color:red">false
</td></tr>
<tr>
<td><a href="en/CSS/empty-cells">emptyCells</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/font-size-adjust">fontSizeAdjust</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/font-stretch">fontStretch</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/left">left</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/marker-offset">markerOffset</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/marks">marks</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/max-height">maxHeight</a></td><td>true</td><td style="background-color:lightblue">ie7 only</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/max-width">maxWidth</a></td><td>true</td><td style="background-color:lightblue">ie7 only</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/min-height">minHeight</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/min-width">minWidth</a></td><td>true</td><td style="background-color:lightblue">ie7 only</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/orphans">orphans</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/outline">outline</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/outline-color">outlineColor</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/outline-style">outlineStyle</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/outline-width">outlineWidth</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/overflow">overflow</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/page">page</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/page-break-after">pageBreakAfter</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/page-break-before">pageBreakBefore</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/page-break-inside">pageBreakInside</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/pause">pause</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/pause-after">pauseAfter</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/pause-before">pauseBefore</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/pitch">pitch</a></td><td>true</td><td style="background-color:red">false</td><td style="background-color:red">false
</td></tr>
<tr>
<td><a href="en/CSS/pitch-range">pitchRange</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/play-during">playDuring</a></td><td style="background-color:red">false</td><td style="background-color:red">false</td><td style="background-color:red">false
</td></tr>
<tr>
<td><a href="en/CSS/position">position</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/quotes">quotes</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/richness">richness</a></td><td>true</td><td style="background-color:red">false</td><td style="background-color:red">false
</td></tr>
<tr>
<td><a href="en/CSS/right">right</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/size">size</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/speak">speak</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/speak-header">speakHeader</a></td><td>true</td><td style="background-color:red">false</td><td style="background-color:red">false
</td></tr>
<tr>
<td><a href="en/CSS/speak-numeral">speakNumeral</a></td><td>true</td><td style="background-color:red">false</td><td style="background-color:red">false
</td></tr>
<tr>
<td><a href="en/CSS/speak-punctuation">speakPunctuation</a></td><td>true</td><td style="background-color:red">false</td><td style="background-color:red">false
</td></tr>
<tr>
<td><a href="en/CSS/speech-rate">speechRate</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/stress">stress</a></td><td>true</td><td style="background-color:red">false</td><td style="background-color:red">false
</td></tr>
<tr>
<td><a href="en/CSS/table-layout">tableLayout</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/text-shadow">textShadow</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/top">top</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/unicode-bidi">unicodeBidi</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/visibility">visibility</a></td><td>true</td><td>true</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/voice-family">voiceFamily</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/volume">volume</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/widows">widows</a></td><td>true</td><td style="background-color:red">false</td><td>true
</td></tr>
<tr>
<td><a href="en/CSS/z-index">zIndex</a></td><td>true</td><td>true</td><td>true
</td></tr>
</tbody></table>
<p><br>
</p>
<h3 name="Test_Code"> Test Code </h3>
<pre>&lt;script type="text/javascript"&gt;
&lt;!-- 

// document properties that are used to determine
// support levels
var _FEATURES = 
{
	'DOMCORE1': [ 
		{name: 'doctype', 'supported': false},
		{name: 'implementation', 'supported': false},
		{name: 'documentElement', 'supported': false},
		{name: 'createElement', 'supported': false},
		{name: 'createDocumentFragment', 'supported': false},
		{name: 'createTextNode', 'supported': false},
		{name: 'createComment', 'supported': false},
		{name: 'createCDATASection', 'supported': false},
		{name: 'createProcessingInstruction', 'supported': false},
		{name: 'createAttribute', 'supported': false},
		{name: 'createEntityReference', 'supported': false},
		{name: 'getElementsByTagName',  'supported': false}
	],
	
	'DOMHTML': [ 
		{name: 'documentElement', 'supported': false},
		{name: 'createElement', 'supported': false},
		{name: 'createDocumentFragment', 'supported': false},
		{name: 'createTextNode', 'supported': false},
		{name: 'createComment', 'supported': false},
		{name: 'createAttribute', 'supported': false},
		{name: 'getElementsByTagName',  'supported': false},
		{name: 'title', 'supported': false},
		{name: 'referrer', 'supported': false},
		{name: 'domain', 'supported': false},
		{name: 'URL', 'supported': false},
		{name: 'body', 'supported': false},
		{name: 'images', 'supported': false},
		{name: 'applets', 'supported': false},
		{name: 'links', 'supported': false},
		{name: 'forms', 'supported': false},
		{name: 'anchors', 'supported': false},
		{name: 'cookie', 'supported': false},
		{name: 'open', 'supported': false},
		{name: 'close', 'supported': false},
		{name: 'write', 'supported': false},
		{name: 'writeln', 'supported': false},
		{name: 'getElementById', 'supported': false},
		{name: 'getElementsByName', 'supported': false}
	],

	'DOMCORE2': [ 
		{name: 'doctype', 'supported': false},
		{name: 'implementation', 'supported': false},
		{name: 'documentElement', 'supported': false},
		{name: 'createElement', 'supported': false},
		{name: 'createDocumentFragment', 'supported': false},
		{name: 'createTextNode', 'supported': false},
		{name: 'createComment', 'supported': false},
		{name: 'createCDATASection', 'supported': false},
		{name: 'createProcessingInstruction', 'supported': false},
		{name: 'createAttribute', 'supported': false},
		{name: 'createEntityReference', 'supported': false},
		{name: 'getElementsByTagName',  'supported': false},
		{name: 'importNode', 'supported': false},
		{name: 'createElementNS', 'supported': false},
		{name: 'createAttributeNS', 'supported': false},
		{name: 'getElementsByTagNameNS', 'supported': false},
		{name: 'getElementById', 'supported': false}
	],

	'DOMCSS1': [
		{name: 'background', 'supported': false},
		{name: 'backgroundAttachment', 'supported': false},
		{name: 'backgroundColor', 'supported': false},
		{name: 'backgroundImage', 'supported': false},
		{name: 'backgroundRepeat', 'supported': false},
		{name: 'border', 'supported': false},
		{name: 'borderSpacing', 'supported': false},
		{name: 'borderStyle', 'supported': false},
		{name: 'borderTop', 'supported': false},
		{name: 'borderRight', 'supported': false},
		{name: 'borderBottom', 'supported': false},
		{name: 'borderLeft', 'supported': false},
		{name: 'borderTopWidth', 'supported': false},
		{name: 'borderRightWidth', 'supported': false},
		{name: 'borderBottomWidth', 'supported': false},
		{name: 'borderLeftWidth', 'supported': false},
		{name: 'borderWidth', 'supported': false},
		{name: 'clear', 'supported': false},
		{name: 'color', 'supported': false},
		{name: 'display', 'supported': false},
		{name: 'cssFloat', 'supported': false},
		{name: 'font', 'supported': false},
		{name: 'fontFamily', 'supported': false},
		{name: 'fontSize', 'supported': false},
		{name: 'fontStyle', 'supported': false},
		{name: 'fontVariant', 'supported': false},
		{name: 'fontWeight', 'supported': false},
		{name: 'height', 'supported': false},
		{name: 'letterSpacing', 'supported': false},
		{name: 'lineHeight', 'supported': false},
		{name: 'listStyle', 'supported': false},
		{name: 'listStyleImage', 'supported': false},
		{name: 'listStylePosition', 'supported': false},
		{name: 'listStyleType', 'supported': false},
		{name: 'margin', 'supported': false},
		{name: 'marginTop', 'supported': false},
		{name: 'marginRight', 'supported': false},
		{name: 'marginBottom', 'supported': false},
		{name: 'marginLeft', 'supported': false},
		{name: 'padding', 'supported': false},
		{name: 'paddingTop', 'supported': false},
		{name: 'paddingRight', 'supported': false},
		{name: 'paddingBottom', 'supported': false},
		{name: 'paddingLeft', 'supported': false},
		{name: 'textAlign', 'supported': false},
		{name: 'textDecoration', 'supported': false},
		{name: 'textIndent', 'supported': false},
		{name: 'textTransform', 'supported': false},
		{name: 'verticalAlign', 'supported': false},
		{name: 'whiteSpace', 'supported': false},
		{name: 'width', 'supported': false},
		{name: 'wordSpacing', 'supported': false}
	],
	
	'DOMCSS2': [
		{name: 'azimuth', 'supported': false},
		{name: 'backgroundPosition', 'supported': false},
		{name: 'borderCollapse', 'supported': false},
		{name: 'borderSpacing', 'supported': false},
		{name: 'borderTopColor', 'supported': false},
		{name: 'borderRightColor', 'supported': false},
		{name: 'borderBottomColor', 'supported': false},
		{name: 'borderLeftColor', 'supported': false},
		{name: 'borderTopStyle', 'supported': false},
		{name: 'borderRightStyle', 'supported': false},
		{name: 'borderBottomStyle', 'supported': false},
		{name: 'borderLeftStyle', 'supported': false},
		{name: 'bottom', 'supported': false},
		{name: 'captionSide', 'supported': false},
		{name: 'clear', 'supported': false},
		{name: 'clip', 'supported': false},
		{name: 'content', 'supported': false},
		{name: 'counterIncrement', 'supported': false},
		{name: 'counterReset', 'supported': false},
		{name: 'cue', 'supported': false},
		{name: 'cueAfter', 'supported': false},
		{name: 'cueBefore', 'supported': false},
		{name: 'cursor', 'supported': false},
		{name: 'direction', 'supported': false},
		{name: 'elevation', 'supported': false},
		{name: 'emptyCells', 'supported': false},
		{name: 'fontSizeAdjust', 'supported': false},
		{name: 'fontStretch', 'supported': false},
		{name: 'left', 'supported': false},
		{name: 'markerOffset', 'supported': false},
		{name: 'marks', 'supported': false},
		{name: 'maxHeight', 'supported': false},
		{name: 'maxWidth', 'supported': false},
		{name: 'minHeight', 'supported': false},
		{name: 'minWidth', 'supported': false},
		{name: 'orphans', 'supported': false},
		{name: 'outline', 'supported': false},
		{name: 'outlineColor', 'supported': false},
		{name: 'outlineStyle', 'supported': false},
		{name: 'outlineWidth', 'supported': false},
		{name: 'overflow', 'supported': false},
		{name: 'page', 'supported': false},
		{name: 'pageBreakAfter', 'supported': false},
		{name: 'pageBreakBefore', 'supported': false},
		{name: 'pageBreakInside', 'supported': false},
		{name: 'pause', 'supported': false},
		{name: 'pauseAfter', 'supported': false},
		{name: 'pauseBefore', 'supported': false},
		{name: 'pitch', 'supported': false},
		{name: 'pitchRange', 'supported': false},
		{name: 'playDuring', 'supported': false},
		{name: 'position', 'supported': false},
		{name: 'quotes', 'supported': false},
		{name: 'richness', 'supported': false},
		{name: 'right', 'supported': false},
		{name: 'size', 'supported': false},
		{name: 'speak', 'supported': false},
		{name: 'speakHeader', 'supported': false},
		{name: 'speakNumeral', 'supported': false},
		{name: 'speakPunctuation', 'supported': false},
		{name: 'speechRate', 'supported': false},
		{name: 'stress', 'supported': false},
		{name: 'tableLayout', 'supported': false},
		{name: 'textShadow', 'supported': false},
		{name: 'top', 'supported': false},
		{name: 'unicodeBidi', 'supported': false},
		{name: 'visibility', 'supported': false},
		{name: 'voiceFamily', 'supported': false},
		{name: 'volume', 'supported': false},
		{name: 'widows', 'supported': false},
		{name: 'zIndex', 'supported': false}
	]
};

function supports(object, featureSet)
{
	var i;
	var features = _FEATURES[featureSet];
	var level = 0;
	
	if (!features)
		return level;
		
	for (i = 0; i &lt; features.length; i++)
		if (typeof(object[features[i].name]) != 'undefined')
		{
			features[i].supported = true;
			++level;
		}

	return Math.floor( (100 *  level) / features.length );
}

function generateReport(object, featureSet, description)
{
	var i;
	var features = _FEATURES[featureSet];

	document.write('&lt;p&gt;&lt;b&gt;' + featureSet + ' support for properties/methods in ' + description + ', percentage of names defined = ' + supports(object, featureSet) + '%&lt;\/b&gt;&lt;\/p&gt;');

	document.write('&lt;table cellspacing="0"&gt;');
	for (i = 0; i &lt; features.length; i++) 
      {
		if (features[i].supported)
 		     document.write('&lt;tr&gt;&lt;td&gt;' + features[i].name + '&lt;\/td&gt;&lt;td&gt;' + features[i].supported + '&lt;\/td&gt;&lt;\/tr&gt;');
		else
			document.write('&lt;tr&gt;&lt;td&gt;' + features[i].name + '&lt;\/td&gt;&lt;td style="background-color:red"&gt;' + features[i].supported + '&lt;\/td&gt;&lt;\/tr&gt;');
      }
	document.write('&lt;\/table&gt;');
}

var oldonerror = window.onerror; // suppress error messages...
window.onerror = null;
document.write('&lt;p&gt;&lt;b&gt; Your browser ' + navigator.userAgent + '&lt;\/b&gt;&lt;\/p&gt;');
generateReport(document,			'DOMCORE1', 'document');
generateReport(document,			'DOMCORE2', 'document');
generateReport(document,			'DOMHTML',  'document');
generateReport(document.body.style,	'DOMCSS1',  'document.body.style');
generateReport(document.body.style,	'DOMCSS2',  'document.body.style');
window.onerror = oldonerror;

//--&gt;
&lt;/script&gt;

</pre>
<h3 name="See_also"> See also </h3>
<ul><li> <a href="en/Browser_Detection_and_Cross_Browser_Support">Browser Detection and Cross Browser Support</a>
</li><li> <a class="external" href="http://en.wikipedia.org/wiki/Comparison_of_layout_engines_(DOM)">Comparison of layout engines</a>
</li><li> <a class="external" href="http://www.opera.com/docs/specs/opera9/">Web Specifications Supported in Opera 9</a>
</li><li> <a class="external" href="http://msdn.microsoft.com/workshop/essentials/whatsnew/whatsnew_70_scr.asp">What's New in Internet Explorer 7 (Script)</a>
</li></ul>
<div class="originaldocinfo">
<h3 name="Original_Document_Information"> Original Document Information </h3>
<ul><li> Author(s): (Unknown)
</li><li> Last Updated Date: Updated March 16, 2003
</li><li> Copyright Information: Copyright © 2001-2003 Netscape.
</li><li> Note: This reprinted article was originally part of the DevEdge site.
</li></ul>
</div>
Revert to this revision