| OLD | NEW |
| 1 # Custom Elements | 1 # Custom Elements |
| 2 | 2 |
| 3 Custom elements let authors create their own elements, with their own | 3 Custom elements let authors create their own elements, with their own |
| 4 methods, behavior, and attribute handling. Custom elements shipped in | 4 methods, behavior, and attribute handling. Custom elements shipped in |
| 5 M33. We colloquially refer to that version as "v0." | 5 M33. We colloquially refer to that version as "v0." |
| 6 | 6 |
| 7 Contact Dominic Cooney | 7 Contact Dominic Cooney |
| 8 ([dominicc@chromium.org](mailto:dominicc@chromium.org)) with | 8 ([dominicc@chromium.org](mailto:dominicc@chromium.org)) with |
| 9 questions. | 9 questions. |
| 10 | 10 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 with CustomElement so you can run them with: | 79 with CustomElement so you can run them with: |
| 80 | 80 |
| 81 $ out/Debug/webkit_unit_tests --gtest_filter=CustomElement* | 81 $ out/Debug/webkit_unit_tests --gtest_filter=CustomElement* |
| 82 | 82 |
| 83 ###### Layout Tests | 83 ###### Layout Tests |
| 84 | 84 |
| 85 The custom element layout tests are generally in | 85 The custom element layout tests are generally in |
| 86 third_party/WebKit/LayoutTests/custom-elements. | 86 third_party/WebKit/LayoutTests/custom-elements. |
| 87 | 87 |
| 88 All custom elements layout tests use the [W3C web-platform-tests | 88 All custom elements layout tests use the [W3C web-platform-tests |
| 89 harness](http://testthewebforward.org/docs/) and follow its style. The | 89 harness](http://web-platform-tests.org/) and follow its style. The |
| 90 W3C is not very prescriptive, so be consistent with other custom | 90 W3C is not very prescriptive, so be consistent with other custom |
| 91 elements tests. | 91 elements tests. |
| 92 | 92 |
| 93 When naming tests, use short names describing what the test is doing. | 93 When naming tests, use short names describing what the test is doing. |
| 94 Avoid articles. For example, "HTMLElement constructor, invoke". When | 94 Avoid articles. For example, "HTMLElement constructor, invoke". When |
| 95 writing assertion messages, start with a lowercase letter (unless the | 95 writing assertion messages, start with a lowercase letter (unless the |
| 96 word is a proper noun), use normal grammar and articles, and include | 96 word is a proper noun), use normal grammar and articles, and include |
| 97 the word “should” to leave no doubt whate the expected | 97 the word “should” to leave no doubt whate the expected |
| 98 behavior is. | 98 behavior is. |
| 99 | 99 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 may remove it even sooner, if we have evidence that sites are using | 147 may remove it even sooner, if we have evidence that sites are using |
| 148 feature detection correctly. | 148 feature detection correctly. |
| 149 | 149 |
| 150 ## References | 150 ## References |
| 151 | 151 |
| 152 These have links to the parts of the DOM and HTML specs which define | 152 These have links to the parts of the DOM and HTML specs which define |
| 153 custom elements: | 153 custom elements: |
| 154 | 154 |
| 155 * [WHATWG DOM Wiki: Custom Elements](https://github.com/whatwg/dom/wiki#custom-e
lements) | 155 * [WHATWG DOM Wiki: Custom Elements](https://github.com/whatwg/dom/wiki#custom-e
lements) |
| 156 * [WHATWG HTML Wiki: Custom Elements](https://github.com/whatwg/html/wiki#custom
-elements) | 156 * [WHATWG HTML Wiki: Custom Elements](https://github.com/whatwg/html/wiki#custom
-elements) |
| OLD | NEW |