mirror of
https://github.com/servo/servo.git
synced 2025-06-25 09:34:32 +01:00
Actually <img> elements in <noscript> are not prefetched anymore. Probably because html5ever already parses the <noscript> content as raw text data if `scripting_enabled` is activated. See https://github.com/servo/html5ever/blob/servo/src/tree_builder/rules.rs# L126 Also, added a test to the images cache.
28 lines
648 B
HTML
28 lines
648 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<script src="harness.js"></script>
|
|
</head>
|
|
<body>
|
|
|
|
<img src="test.png">
|
|
|
|
<noscript>
|
|
<img src="test.jpg">
|
|
</noscript>
|
|
|
|
<script>
|
|
var images = document.images;
|
|
is(images, document.images);
|
|
is(images.length, 1);
|
|
|
|
var image = document.createElement("img");
|
|
image.setAttribute("src", "test.jpg");
|
|
document.body.appendChild(image);
|
|
is(images.length, 2);
|
|
|
|
document.body.removeChild(image);
|
|
is(images.length, 1);
|
|
</script>
|
|
</body>
|
|
</html>
|