Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<meta charset="utf-8">
<title>NavigatorLanguage: the most preferred language is the one returned by navigator.language</title>
<link rel="author" title="Intel" href="http://www.intel.com">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
test(function() {
assert_true("language" in navigator);
assert_true("languages" in navigator);
assert_equals(navigator.languages[0], navigator.language,
"navigator.languages is the most preferred language first");
});
</script>