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 20364 - Interface feedback
Summary: Interface feedback
Status: CLOSED FIXED
Alias: None
Product: AudioWG
Classification: Unclassified
Component: MIDI API (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: TBD
Assignee: Chris Wilson
QA Contact: public-audio
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-12 21:24 UTC by Chris Wilson
Modified: 2013-01-02 11:32 UTC (History)
3 users (show)

See Also:


Attachments

Description Chris Wilson 2012-12-12 21:24:01 UTC
From Marcos Caceres (marcos@marcosc.com) 

The following is not defined correctly:

[NoInterfaceObject]
interface NavigatorMIDIAccess {
    void getMIDIAccess (NavigatorMIDIAccessSuccessCallback successCallback, optional NavigatorMIDIAccessErrorCallback? errorCallback);

};


Should just be:

partial interface Navigator {
    void getMIDIAccess (NavigatorMIDIAccessSuccessCallback successCallback, optional NavigatorMIDIAccessErrorCallback? errorCallback);
};





Bikeshed: NavigatorMIDIAccessSuccessCallback is a little excessive :) Just called them "successcb" and "failcb". They are just functions without a "real" interface, so no need to go all camel case there :)

Also, MIDIPort should not be a [NoInterfaceObject]. Either fold it into MIDIOutput or make it into a partial interface.

Generally speaking, don't make things [NoInterfaceObject]. WebIDL says not to do that unless its for Legacy reasons:

[[
Warning

The [NoInterfaceObject] (http://www.w3.org/TR/WebIDL/#NoInterfaceObject) extended attribute should not be used on interfaces that are not solely used as supplemental (http://www.w3.org/TR/WebIDL/#dfn-supplemental-interface) interfaces, unless there are clear Web compatibility reasons for doing so. Specification authors who wish to use this feature are strongly advised to discuss this on the public-script-coord@w3.org (mailto:public-script-coord@w3.org) mailing list before proceeding.
]]

Also applied to MIDIEvent.
Comment 1 Jussi Kalliokoski 2012-12-13 15:31:59 UTC
(In reply to comment #0)
> From Marcos Caceres (marcos@marcosc.com) 
> 
> The following is not defined correctly:
> 
> [NoInterfaceObject]
> interface NavigatorMIDIAccess {
>     void getMIDIAccess (NavigatorMIDIAccessSuccessCallback successCallback,
> optional NavigatorMIDIAccessErrorCallback? errorCallback);
> 
> };
> 
> 
> Should just be:
> 
> partial interface Navigator {
>     void getMIDIAccess (NavigatorMIDIAccessSuccessCallback successCallback,
> optional NavigatorMIDIAccessErrorCallback? errorCallback);
> };
> 

Not fixed yet.

> 
> 
> Bikeshed: NavigatorMIDIAccessSuccessCallback is a little excessive :) Just
> called them "successcb" and "failcb". They are just functions without a
> "real" interface, so no need to go all camel case there :)

Fixed: https://dvcs.w3.org/hg/audio/rev/bf4f6fd3ecef

> Also, MIDIPort should not be a [NoInterfaceObject]. Either fold it into
> MIDIOutput or make it into a partial interface.
> 
> Generally speaking, don't make things [NoInterfaceObject]. WebIDL says not
> to do that unless its for Legacy reasons:
> 
> [[
> Warning
> 
> The [NoInterfaceObject] (http://www.w3.org/TR/WebIDL/#NoInterfaceObject)
> extended attribute should not be used on interfaces that are not solely used
> as supplemental (http://www.w3.org/TR/WebIDL/#dfn-supplemental-interface)
> interfaces, unless there are clear Web compatibility reasons for doing so.
> Specification authors who wish to use this feature are strongly advised to
> discuss this on the public-script-coord@w3.org
> (mailto:public-script-coord@w3.org) mailing list before proceeding.
> ]]
> 
> Also applied to MIDIEvent.

Fixed: https://dvcs.w3.org/hg/audio/rev/bf4f6fd3ecef
Comment 2 Jussi Kalliokoski 2012-12-13 16:21:16 UTC
(In reply to comment #0)
> From Marcos Caceres (marcos@marcosc.com) 
> 
> The following is not defined correctly:
> 
> [NoInterfaceObject]
> interface NavigatorMIDIAccess {
>     void getMIDIAccess (NavigatorMIDIAccessSuccessCallback successCallback,
> optional NavigatorMIDIAccessErrorCallback? errorCallback);
> 
> };
> 
> 
> Should just be:
> 
> partial interface Navigator {
>     void getMIDIAccess (NavigatorMIDIAccessSuccessCallback successCallback,
> optional NavigatorMIDIAccessErrorCallback? errorCallback);
> };

Fixed: https://dvcs.w3.org/hg/audio/rev/ddd6455eebf6
Comment 3 Chris Wilson 2012-12-13 19:27:32 UTC
All issues represented here have been fixed.
Comment 4 Olivier Thereaux 2013-01-02 11:32:33 UTC
The two changesets look good. 
https://dvcs.w3.org/hg/audio/rev/bf4f6fd3ecef
https://dvcs.w3.org/hg/audio/rev/ddd6455eebf6

Closing.