summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/script-charset-03.html
blob: 4ff4cc6b0bae715005ec31a42709fe2b8dc690b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Script changing @charset</title>
<link rel="help" href="https://html.spec.whatwg.org/multipage/#scriptingLanguages">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
async_test(function() {
  var s = document.createElement("script");
  s.src = "external-script-windows1250.js";
  s.charset = "windows-1250";
  document.body.appendChild(s);
  s.charset = "utf-8";
  window.onload = this.step_func_done(function() {
    assert_equals(window.getSomeString(), "\u015b\u0107\u0105\u017c\u017a");
  });
})
</script>