@@ -805,6 +805,58 @@ and doing cleanup as necessary (see above).
805
805
is still [under discussion] (https://github.com/whatwg/html/issues/6588).
806
806
</div>
807
807
808
+ <h3 id="third-party-tools">Prioritize usability over compatibility with third-party tools</h3>
809
+
810
+ Design new features with usability as the primary goal, and compatibility with third-party tooling as a secondary goal.
811
+
812
+ The web platform benefits from a wide ecosystem of tooling
813
+ to facilitate easier and faster development.
814
+ A lot of the time, the syntax of an upcoming web platform feature
815
+ may conflict with that of a third-party tool causing breakage.
816
+ This is especially common as third-party tools are often used to prototype
817
+ new web platform features.
818
+
819
+ In general, web platform features last a lot longer than most third-party tools,
820
+ and thus giving them the optimal syntax and functionality should be of high priority.
821
+
822
+ In some cases, the conflict will introduce problems across a large number of
823
+ web sites, necessitating the feature's syntax to be redesigned to avoid clashes.
824
+
825
+ <div class="example">
826
+ <code> Array.prototype.contains()</code> had to be renamed to
827
+ <code> Array.prototype.includes()</code> to avoid clashes with
828
+ the identically named but incompatible method from PrototypeJS,
829
+ a library that was in use in millions of websites.
830
+ </div>
831
+
832
+ However, these cases should be exceptions.
833
+
834
+ When deciding whether to break third party tools with new syntax, there are several factors to consider,
835
+ such as severity of the breakage,
836
+ popularity of the third party tool,
837
+ and many more.
838
+
839
+ Possibly the most important factor is how severely would the usability of the web platform feature be compromised
840
+ if its syntax was changed to avoid breaking the third party tool?
841
+ If several alternatives of similar usability are being considered,
842
+ it is usually preferable to prioritize the ones that inconvenience third party tools the least.
843
+
844
+ <div class="example">
845
+ When the CSS WG was designing [[CSS-GRID-1|CSS Grid Layout]] ,
846
+ square brackets were chosen instead of parentheses for naming grid tracks
847
+ to avoid breaking Sass, a popular preprocessor.
848
+ </div>
849
+
850
+ However, if avoiding breaking the third party tool would lead to
851
+ a *significant* negative impact on of the feature's usability,
852
+ that is rarely an acceptable tradeoff,
853
+ unless it causes significant breakage of live websites.
854
+
855
+ Languages should also provide mechanisms for extensibility
856
+ that authors can use to extend the language
857
+ without breaking future native functionality,
858
+ to reduce such dilemmas in the future.
859
+
808
860
<h2 id="html">HTML</h2>
809
861
810
862
This section details design principles for features which are exposed via HTML.
0 commit comments