mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Address comments Add a basic parser benchmark This CL adds a basic benchmark for the parser. There isn't a direct way to exercise the parser in Sky, so we use imports. This CL also adds a load event to <import> to determine when the import is done loading. R=eseidel@chromium.org parser benchmark wip
18 lines
525 B
Plaintext
18 lines
525 B
Plaintext
<html>
|
|
<import src="../resources/dump-as-text.sky" />
|
|
<div id="result1">FAIL</div>
|
|
<div id="result2">FAIL</div>
|
|
<script>
|
|
var element = document.createElement("import");
|
|
element.setAttribute("src", "resources/pass.sky");
|
|
element.setAttribute("as", "hello");
|
|
element.addEventListener("load", function() {
|
|
document.getElementById("result1").textContent = "PASS: Load event fired.";
|
|
});
|
|
document.documentElement.appendChild(element);
|
|
</script>
|
|
<script>
|
|
document.getElementById("result2").textContent = hello;
|
|
</script>
|
|
</html>
|