- From: <bugzilla@jessica.w3.org>
- Date: Sun, 14 Oct 2012 16:56:08 +0000
- To: public-webapps-bugzilla@w3.org
- Message-ID: <bug-15555-2532-GKNsXLhOcO@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=15555 Aryeh Gregor <ayg@aryeh.name> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ayg@aryeh.name --- Comment #3 from Aryeh Gregor <ayg@aryeh.name> --- I looked at Google Code Search (which seems to still work?), and here are some of the uses I found before I got bored <http://code.google.com/codesearch#search/&q=hasFeature%20lang:%5Ejavascript$&type=cs>. I didn't check that all of these actually call the native document.implementation.hasFeature and not some other thing called that, but in some cases it's obvious they do unless prototype hackery is happening. """ hasSupport.support = ( typeof document.implementation != "undefined" && document.implementation.hasFeature( "html", "1.0" ) || ie55 ) """ http://xinc.googlecode.com/svn, trunk/web/js/tabpane.js """ 1339: if ( typeof document.implementation != "undefined" && 1340: document.implementation.hasFeature("HTML", "1.0") && 1341: document.implementation.hasFeature("Events", "2.0") && 1342: document.implementation.hasFeature("CSS", "2.0") ) { 1343: document.addEventListener("mouseup", this._mouseUpHandler.bindAsEventListener(this), false); """ http://arctos.googlecode.com/svn, historical/v2.4/includes/rico.js """ a.type=h.SVGAngle||g.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML" """ http://browserscope.googlecode.com/svn, trunk/static/raphael-min.js """ 579: var supportAtRule = impl.hasFeature('CSS2', '') ? 580: function(rule) { """ http://sintoniadoamor.googlecode.com/svn, trunk/MusicoEMusicas/src/packages/Modernizr.1.7/Content/Scripts/modernizr-1.7.js """ 58: ... _HAS_DOM_FEATURE&&window.Document&&!Document.prototype.load&&document.implementation.hasFeature('LS','3.0')){Sarissa.getDomDocument=function(s ... """ http://vosao.googlecode.com/svn, trunk/web/src/main/webapp/static/js/sarissa.js """ 1921: ... w.w3.org/TR/SVG11/feature#";return(document.implementation&&(document.implementation.hasFeature("org.w3c.svg","1.0")||document.implementation. ... 2068: ... w.w3.org/TR/SVG11/feature#";return(document.implementation&&(document.implementation.hasFeature("org.w3c.svg","1.0")||document.implementation. ... """ http://geocontexter.googlecode.com/svn, trunk/public/library/OpenLayers/OpenLayers.js """ 2375: hasNativeSVG: function() { 2376: if (document.implementation && document.implementation.hasFeature) { 2377: return document.implementation.hasFeature( 2378: 'http://www.w3.org/TR/SVG11/feature#BasicStructure', '1.1'); """ http://pentaho-cdf.googlecode.com/svn, trunk/bi-platform-v2-plugin/cdf/js/lib/CCC/svg.js """ 3781: var imp = Y.config.doc && Y.config.doc.implementation; 3782: return (imp && (!imp.hasFeature('Events', '2.0'))); """ http://bhl-bits.googlecode.com/svn, trunk/bhl-e/pre-ingest/PreIngest/src/main/webapp/resources/yui/build/yui/yui.js """ 16: if(document.implementation && document.implementation.hasFeature && 17: !document.implementation.hasFeature('WebForms', '2.0')){ """ http://webforms2.googlecode.com/svn, trunk/webforms2.js """ 55: config.hasNative = !!(document.implementation 56: && document.implementation.hasFeature 57: && document.implementation.hasFeature("XPath", null)); """ http://gmaps-api-issues.googlecode.com/svn, trunk/puppet/xpath.js """ 653: var tdi=_ac["implementation"]; 654: if((tdi)&&(tdi["hasFeature"])&&(tdi.hasFeature("org.w3c.dom.svg","1.0"))){ """ http://selenium.googlecode.com/svn, trunk/selenium/src/web/tests/html/dojo-0.4.0-mini/dojo.js """ 73: uu.ua.domrange = uud.implementation && uud.implementation.hasFeature("Range", "2.0"); // is DOM Level2 Range Module """ http://uupaa-js.googlecode.com/svn, trunk/0.6/uupaa.js Notably, I think at least one browser returns true for each of these, right? If so, are there any objections to just always returning true? That means we should fall into the "has feature" codepath. The only danger would be if people gated on hasFeature() for a nonexistent feature by mistake and then unwittingly left the dead code in, but that seems like a reasonably small risk. Anyone object to me making hasFeature always return true? I'm writing a patch for Gecko, although I don't know if it will get accepted: https://bugzilla.mozilla.org/show_bug.cgi?id=801425 -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Sunday, 14 October 2012 16:56:10 UTC