wpt / css / selectors / selector-read-write-type-change-001.html

Status: FAIL | Duration: 10ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/selectors/selector-read-write-type-change-001.html

<!DOCTYPE html>
<html>
  <head>
    <title>Check for correctly updating :read-write matching on type change</title>
    <link rel="match" href="selector-read-write-type-change-001-ref.html">
    <link rel="help" href="https://drafts.csswg.org/selectors-4/#rw-pseudos">
    <style>
      span { color: green; }
      :read-write + span { color: red }
    </style>
    <script>
      onload = function() {
        document.querySelector("input").type = "button";
      }
    </script>
  </head>
  <body>
    <input required><span>This should be green</span>
  </body>
</html>

/css/selectors/selector-read-write-type-change-001-ref.html

<!DOCTYPE html>
<html>
  <head>
    <style>
      span { color: green; }
    </style>
  </head>
  <body>
    <input type="button"><span>This should be green</span>
  </body>
</html>