[bug] DFXP 1.0 with caffeine code - Opera browser

Hi Philippe, 

The DFXP 1.0 with caffeine[1] code[2] needs to be updated to support Opera. Whenever the code uses getAttributeNS, it expects a blank string, but Opera returns null; you need to check for this as well:
 
     v = dfxpElement.getAttributeNS(XHTML_NS, "style"); 
     if (v != "") { 

btw, Mozilla also recommends using hasAttributeNS [3]


[1]: http://www.w3.org/2009/02/ThisIsCoffee.html
[2]: http://www.w3.org/2008/12/dfxp-testsuite/web-framework/HTML5_player.js 
[3]: https://developer.mozilla.org/en/DOM/element.getAttributeNS#Notes


-- 
Karl Dubost - http://dev.opera.com/
Developer Relations & Tools, Opera Software

Received on Monday, 28 March 2011 18:37:31 UTC