Add a pseudoclass that matches img elements that are backed by an attachment
[WebKit-https.git] / LayoutTests / fast / css / has-attachment.html
1 <!DOCTYPE html><!-- webkit-test-runner [ enableAttachmentElement=true ] -->
2 <head>
3     <script src="../../resources/js-test-pre.js"></script>
4     <style>
5         img { clear: both; }
6         img:has-attachment { clear: none; }
7     </style>
8 </head>
9 <body>
10     <img id=target>
11     <script>
12         description("This tests the :has-attachment pseudoclass.");
13         var target = document.getElementById("target");
14         shouldBeEqualToString("getComputedStyle(target).clear", "both");
15         HTMLAttachmentElement.getAttachmentIdentifier(target);
16         shouldBeEqualToString("getComputedStyle(target).clear", "none");
17     </script>
18     <script src="../../resources/js-test-post.js"></script>
19 </body>