Canvas toDataURL does not accept excess arguments

RESOLVED DUPLICATE of bug 564388

Status

()

P2
normal
RESOLVED DUPLICATE of bug 564388
11 years ago
8 years ago

People

(Reporter: philip, Unassigned)

Tracking

(Blocks: 1 bug, {html5})

Trunk
html5
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

11 years ago
User-Agent:       Opera/9.24 (X11; Linux i686; U; en)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a9pre) Gecko/2007103004 Minefield/3.0a9pre

The spec explicitly says about the toDataURL(type) method:

   "Arguments other than the type must be ignored, and must not cause the user agent to raise an exception (as would normally occur if a method was called with the wrong number of arguments). A future version of this specification will probably allow extra parameters to be passed to toDataURL() to allow authors to more carefully control compression settings, image metadata, etc."


Reproducible: Always

Steps to Reproduce:
1. Call toDataURL with arguments other than type, from unprivileged content.

Actual Results:  
NS_ERROR_DOM_SECURITY_ERR is thrown.

Expected Results:  
The extra arguments should be ignored.

It looks like the extra arguments are used for some proprietary purpose by trusted code (hence the security exception in untrusted code). Since it directly contradicts the spec, either the implementation or the spec should be changed so they're consistent.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2
Keywords: html5
Duplicate of this bug: 564388
Keywords: dev-doc-needed
Depends on: 564388
Fixed in bug 564388.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
No longer depends on: 564388
Resolution: --- → DUPLICATE
Duplicate of bug: 564388

Updated

8 years ago
Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.