This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6183 - udom-glob-204-t.svg is an invalid test
Summary: udom-glob-204-t.svg is an invalid test
Alias: None
Product: SVG
Classification: Unclassified
Component: Micro DOM (uDOM) (show other bugs)
Version: SVG 1.2 Tiny
Hardware: PC Windows XP
: P2 normal
Target Milestone: Test Suite
Assignee: Doug Schepers
QA Contact: SVG Public List
Depends on:
Reported: 2008-10-24 07:29 UTC by Michael Garrett
Modified: 2009-01-16 15:04 UTC (History)
1 user (show)

See Also:


Description Michael Garrett 2008-10-24 07:29:18 UTC
According to the specification at:

void getURL(in DOMString iri, in AsyncStatusCallback callback)

GetUrl must pass in an object for the AsynStatusCallback.  This object must implement the interface of operationComplete. 

The ECMA script bindings have the same requirements.

In the test file the following code is used:

function callback(i)
    this.fn = function(status) { updateStatus("actual" + i, status); };

var callbacks = new Array(rows.length);

    for(var i = 0; i < rows.length; i++)
        callbacks[i] = new callback(i);
        getURL(rows[i].url, callbacks[i].fn);

This is invalid according to the specification.

this.fn should be changed to this.operationComplete


getURL(rows[i].url, callbacks[i].fn);

should be changed to: 
getURL(rows[i].url, callbacks[i]);

Another option is to change the specification to allow functions to be passed in, as well as an object.
Comment 1 Michael Garrett 2008-10-24 07:31:33 UTC
A follow up:

The interface to implement for the AsynStatusCallback object is:

interface AsyncStatusCallback
	void operationComplete(in AsyncURLStatus status);

Not operationComplete as above.  Whoops.
Comment 2 Cameron McCormack 2009-01-08 05:28:57 UTC
(In reply to comment #0)
> Another option is to change the specification to allow functions to be passed
> in, as well as an object.

This was the intention, but it seems text in the ECMAScript language binding appendix wasn't updated to allow AsyncStatusCallback to be implemented as a Function, only an EventListener.  I've added a draft erratum for this to be discussed by the WG:
Comment 3 Cameron McCormack 2009-01-16 05:32:30 UTC
Erratum now published: