| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <script src="../../resources/js-test-pre.js"></script> |
| description("This tests that custom properties on element.dataset persist GC."); |
| return GCController.collect(); |
| for (var i = 0; i < 10000; i++) { |
| var d = document.createElement("div"); |
| // Add a property to our prototype. It will be hidden by the corresponding data- attribute. |
| dataset.__proto__.customProperty = 1; |
| dataset.customProperty = 1; // Now set a property on ourselves. |
| shouldBe("d.getAttribute('data-custom-property')", "'1'"); |
| shouldBe("d.dataset.customProperty", "'1'"); |
| // Test that the custom property persisted the GC. |
| shouldBe("d.dataset.customProperty", "'1'"); |
| <script src="../../resources/js-test-post.js"></script> |