HTMLTrackElement-kind-attribute.html 939 B

1234567891011121314151617181920
  1. <!DOCTYPE html>
  2. <script src="../include.js"></script>
  3. <script>
  4. test(() => {
  5. const trackElement = document.createElement("track");
  6. println(`kind initial value: '${trackElement.kind}'`);
  7. trackElement.kind = "invalid";
  8. println(`kind value after setting to "invalid": '${trackElement.kind}'`);
  9. trackElement.kind = "captions";
  10. println(`kind value after setting to "captions": '${trackElement.kind}'`);
  11. trackElement.kind = null;
  12. println(`kind value after setting to null: '${trackElement.kind}'`);
  13. trackElement.kind = "CHAPTERS";
  14. println(`kind value after setting to "CHAPTERS": '${trackElement.kind}'`);
  15. trackElement.kind = "";
  16. println(`kind value after setting to "": '${trackElement.kind}'`);
  17. trackElement.removeAttribute("kind");
  18. println(`kind value after calling removeAttribute: '${trackElement.kind}'`);
  19. });
  20. </script>