You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code inspection of Firefox suggests that createPattern() there will first throw for the repetition argument, then the image. I wonder if that's universal. Also suggests there's no test coverage for exception order.
It would be better if we could use an enum, though that would change the type of exception.
We should maybe also consider allowing the second argument to be omitted. You can already use null instead of "", but not undefined. Seems silly?
Editorial: the first step can be removed, the arguments are clear from the method header.
The text was updated successfully, but these errors were encountered:
document.createElement("canvas").getContext("2d").createPattern(document.createElement("img"), "") results in an exception in Firefox, not in the other browsers, despite the image not being fully decodable.
Making this use an enum is probably not worth the effort, though @junov argued elsewhere for more IDL, so maybe?
Code inspection of Firefox suggests that createPattern() there will first throw for the repetition argument, then the image. I wonder if that's universal. Also suggests there's no test coverage for exception order.
It would be better if we could use an enum, though that would change the type of exception.
We should maybe also consider allowing the second argument to be omitted. You can already use null instead of "", but not undefined. Seems silly?
Editorial: the first step can be removed, the arguments are clear from the method header.The text was updated successfully, but these errors were encountered: