Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This documentation is preliminary and is subject to change.]
Retrieves the collection of user agents and versions declared in the X-UA-Compatible meta tag.
![]() |
Syntax
HRESULT value = object.get_compatible(IHTMLDocumentCompatibleInfoCollection** p);
Property values
Type: Object
the collection of user agents and versions.
Remarks
This method is available in all compatibility modes.
Examples
The following script iterates through the collection of compatible user agents, and displays each on a separate line.
<meta http-equiv="X-UA-Compatible" content="IE=8;FF=3;OtherUA=4" />
<script type="text/javascript">
window.attachEvent('onload',function(e) {
var a = [];
var compat = document.compatible;
for (var i=0; i<compat.length; i++) {
a.push(compat[i].userAgent + '=' + compat[i].version);
}
var o = document.getElementById('output');
o.innerHTML = a.join('<br/>');
});
</script>
<div id="output"></div>
See also
Reference
Conceptual
Defining Document Compatibility
Build date: 6/12/2012
.png)