https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 278bef4fc3194c6a6a5ba46f1215774f301f971f authored by Philip Jägenstedt on 22 March 2018, 14:57:46 UTC
Dummy idlharness.js change to debug #10144
Tip revision: 278bef4
selector-placeholder-shown-type-change-003.html
<!DOCTYPE html>
<html class="reftest-wait">
  <head>
    <title>Check for correctly updating :placeholder-shown matching on type change</title>
    <link rel="match" href="selector-placeholder-shown-type-change-003-ref.html">
    <link rel="help" href="https://drafts.csswg.org/selectors-4/#placeholder">
    <style>
      span { color: green; }
      :placeholder-shown + span { color: red }
    </style>
    <script>
      onload = function() {
        // setTimeout because in some browsers apparently a toplevel restyle
        // happens right after the load event fires?
        setTimeout(function() {
          document.querySelector("input").type = "hidden";
          document.documentElement.className = "";
        }, 10);
      }
    </script>
  </head>
  <body>
    <input required placeholder="text"><span>This should be green</span>
  </body>
</html>
back to top