W3C home > Mailing lists > Public > public-html@w3.org > July 2012

Bug #17760 createPattern(canvas, null) now throws rather than 'repeat'

From: Kris Krueger <krisk@microsoft.com>
Date: Thu, 12 Jul 2012 15:59:37 +0000
To: "public-html@w3.org" <public-html@w3.org>
Message-ID: <0A605FCDA3A4DC45A98B0DDD1C5351A70373ECBA@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com>
Per the previous HTML WG  meeting I opened a bug to get consensus on the spec change to throw and exception rather than treat null as 'repeat'.

https://www.w3.org/Bugs/Public/show_bug.cgi?id=17760

>From the bug...
For compatibility and interoperability it would seem far safer to not throw an exception when createPattern(canvas, null) is used.  In the below list of browsers that treat this as a 'repeat' e.g. createPattern(canvas, 'repeat').

The previous version of the spec had a normative statement that matched the majority of browsers.  
The latest version of the spec changed this normative statement.

Previous Spec
'If the empty string or null is specified, repeat must be assumed. If an unrecognized value is given, then the user agent must raise a SYNTAX_ERR exception'

Current working draft has changed to 
'If the empty string is specified, repeat must be assumed. If an unrecognized value is given, then the user agent must raise a SYNTAX_ERR exception.'

Treats null as 'repeat'
Firefox 13.1
Internet Explorer 9
Chrome 20

Opera 12 does indeed raise an exception when passed 'null'
Received on Thursday, 12 July 2012 16:00:21 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:33 UTC