canmove, Confirmed users
2,675
edits
m (typo) |
(→DOM API vendor prefixing: styling/heading for more content structure) |
||
Line 97: | Line 97: | ||
=== DOM API vendor prefixing === | === DOM API vendor prefixing === | ||
==== spec implementation problem statement ==== | |||
Problem statement: the '''specification-implementation co-dependency problem'''. | Problem statement: the '''specification-implementation co-dependency problem'''. | ||
Line 104: | Line 105: | ||
There are three areas of the open web app platform that this has been problematic: | There are three areas of the open web app platform that this has been problematic: | ||
# CSS. In the past, some properties were implemented, either as spec'd (and the spec was buggy), or in a way that made sense but incompatible with the spec (because the spec didn't make sense or was not useful to web authors), and then we got "stuck" with those implementations and were not able to update/fix the spec and the respective properties and/or values. Examples: | # '''CSS'''. In the past, some properties were implemented, either as spec'd (and the spec was buggy), or in a way that made sense but incompatible with the spec (because the spec didn't make sense or was not useful to web authors), and then we got "stuck" with those implementations and were not able to update/fix the spec and the respective properties and/or values. Examples: | ||
## 'clip' property. mis-specified in CSS 2.0. implemented as presumed intended in IE4/Windows etc. but turned out to be buggy. some content started depending on it. we (CSS WG at the time) were unable to really fix it in a way that implementations could change, though [http://www.w3.org/TR/CSS21/visufx.html#clipping CSS 2.1 tries to fix clip]. | ## 'clip' property. mis-specified in CSS 2.0. implemented as presumed intended in IE4/Windows etc. but turned out to be buggy. some content started depending on it. we (CSS WG at the time) were unable to really fix it in a way that implementations could change, though [http://www.w3.org/TR/CSS21/visufx.html#clipping CSS 2.1 tries to fix clip]. | ||
## 'word-wrap' property. in this case, created/proposed by Microsoft, and [http://msdn.microsoft.com/en-us/library/ms531186.aspx implemented as of IE5.5/Windows ca 2000], we are again, kind of stuck with the particular implementation. [http://www.codingforums.com/archive/index.php/t-2075.html Forum posts as of 2002 were recommending use of the literal word-wrap property]. Though since Microsoft did switch to advocating/supporting a prefixed version '-ms-word-wrap'. Note that it is also [https://developer.mozilla.org/en/CSS/word-wrap supported in Firefox 3.5 ca 2009], and it is in the latest (2007) version of the [http://www.w3.org/TR/2007/WD-css3-text-20070306/#word-wrap CSS3 Text spec which is just a working draft]. | ## 'word-wrap' property. in this case, created/proposed by Microsoft, and [http://msdn.microsoft.com/en-us/library/ms531186.aspx implemented as of IE5.5/Windows ca 2000], we are again, kind of stuck with the particular implementation. [http://www.codingforums.com/archive/index.php/t-2075.html Forum posts as of 2002 were recommending use of the literal word-wrap property]. Though since Microsoft did switch to advocating/supporting a prefixed version '-ms-word-wrap'. Note that it is also [https://developer.mozilla.org/en/CSS/word-wrap supported in Firefox 3.5 ca 2009], and it is in the latest (2007) version of the [http://www.w3.org/TR/2007/WD-css3-text-20070306/#word-wrap CSS3 Text spec which is just a working draft]. | ||
### See related 'word-break' property ([http://www.w3.org/TR/2007/WD-css3-text-20070306/#word-break word-break in CSS3 Text WD] - latest, 2007), also [http://msdn.microsoft.com/en-us/library/ms531184.aspx initially (partially) implemented in Internet Explorer 5.x as word-break], and later switched to the prefixed '-ms-word-break'. [http://msdn.microsoft.com/en-us/library/cc351024%28VS.85%29.aspx More on CSS Compatibility and Internet Explorer]. | ### See related 'word-break' property ([http://www.w3.org/TR/2007/WD-css3-text-20070306/#word-break word-break in CSS3 Text WD] - latest, 2007), also [http://msdn.microsoft.com/en-us/library/ms531184.aspx initially (partially) implemented in Internet Explorer 5.x as word-break], and later switched to the prefixed '-ms-word-break'. [http://msdn.microsoft.com/en-us/library/cc351024%28VS.85%29.aspx More on CSS Compatibility and Internet Explorer]. | ||
# HTML. Too many examples to list here. Some browsers are still stuck supporting <code><blink></code> and <code><marquee></code> (which has many odd details), nevermind the classic example of <code><table></code> layout, with tons of odd special cases and error-handling, originally from Netscape's implementation, reverse-engineered by Microsoft in Internet Explorer, which has subsequently been reverse-engineered by every other browser. | # '''HTML'''. Too many examples to list here. Some browsers are still stuck supporting <code><blink></code> and <code><marquee></code> (which has many odd details), nevermind the classic example of <code><table></code> layout, with tons of odd special cases and error-handling for compat, originally from Netscape's implementation, reverse-engineered by Microsoft in Internet Explorer, which has subsequently been reverse-engineered by every other browser. | ||
# DOM. In particular [http://www.w3.org/TR/2009/WD-webstorage-20091222/ Web Storage working draft] (e.g. the 'localStorage' attribute/property) was implemented in multiple browsers (IE8+, Chrome, Safari, Opera, Mozilla as of 2010 - date order unknown). By the time people discovered it was not threadsafe as specified, it was too late to change the spec to fix that problem - it would have broken too many apps/sites already written which apparently depended on it. | # '''DOM'''. In particular [http://www.w3.org/TR/2009/WD-webstorage-20091222/ Web Storage working draft] (e.g. the 'localStorage' attribute/property) was implemented in multiple browsers (IE8+, Chrome, Safari, Opera, Mozilla as of 2010 - date order unknown). By the time people discovered it was not threadsafe as specified, it was too late to change the spec to fix that problem - it would have broken too many apps/sites already written which apparently depended on it. | ||
==== existing solutions ==== | |||
The only one of these areas of technology that has an explicit solution to the specification-implementation co-dependency problem is CSS, through vendor-prefixes. | The only one of these areas of technology that has an explicit solution to the specification-implementation co-dependency problem is CSS, through vendor-prefixes. | ||
===== CSS vendor prefixes ===== | |||
In the early 2000s the participants in the CSS working group agreed to formalize a way for implementors to build experimental implementations of new properties and values which were only in a working draft (not yet in a Candidate Recommendation) without saddling the property with implementation specific bugs that content would end up inadvertently depending on. | In the early 2000s the participants in the CSS working group agreed to formalize a way for implementors to build experimental implementations of new properties and values which were only in a working draft (not yet in a Candidate Recommendation) without saddling the property with implementation specific bugs that content would end up inadvertently depending on. | ||
Line 129: | Line 131: | ||
* -ms-word-wrap | * -ms-word-wrap | ||
===== CSS vendor prefixes case studies ===== | |||
* '''border-radius'''. for a few years now browsers have been implementing ''vendor prefixed'' versions of the border-radius properties, web authors have been experimenting on the web, and the spec has iterated/improved based on feedback. Now we have a well-designed and road-tested 'border-radius' property in a CR spec and implementations are implementing that. | * '''border-radius'''. for a few years now browsers have been implementing ''vendor prefixed'' versions of the border-radius properties, web authors have been experimenting on the web, and the spec has iterated/improved based on feedback. Now we have a well-designed and road-tested 'border-radius' property in a CR spec and implementations are implementing that. | ||
* '''word-wrap vs whitespace: pre-wrap'''. interactions between new properties and new values on existing properties. See this [http://scottonwriting.net/sowBlog/archive/0000/00/00/163005.aspx example of the property vs value interaction] between the new 'word-wrap' property and the (sometimes prefixed) new 'pre-wrap' value on the 'whitespace' property. The point is to show how prefixing can actually work across different approaches to evolving CSS. | * '''word-wrap vs whitespace: pre-wrap'''. interactions between new properties and new values on existing properties. See this [http://scottonwriting.net/sowBlog/archive/0000/00/00/163005.aspx example of the property vs value interaction] between the new 'word-wrap' property and the (sometimes prefixed) new 'pre-wrap' value on the 'whitespace' property. The point is to show how prefixing can actually work across different approaches to evolving CSS. | ||
==== analysis of applicability ==== | |||
Can we apply similar thinking and solutions to HTML and/or DOM? | Can we apply similar thinking and solutions to HTML and/or DOM? | ||
Line 141: | Line 144: | ||
[https://developer.mozilla.org/en/DOM/window.onmozorientation mozOrientation] is a good example of a vendor prefixed DOM interface implementation. (Note mozOrientation needs to be submitted to a W3C working group for standardization/iteration) | [https://developer.mozilla.org/en/DOM/window.onmozorientation mozOrientation] is a good example of a vendor prefixed DOM interface implementation. (Note mozOrientation needs to be submitted to a W3C working group for standardization/iteration) | ||
==== simple DOM vendor prefixes proposal ==== | |||
For all DOM interfaces that are: | For all DOM interfaces that are: |