jussi-kalliokoski / webmidi-issues

A test repo for importing the issues from bugzilla
0 stars 0 forks source link

Interface feedback #23

Closed jussi-kalliokoski closed 11 years ago

jussi-kalliokoski commented 11 years ago

Originally reported on W3C Bugzilla ISSUE-20364 Wed, 12 Dec 2012 21:24:01 GMT Reported by Chris Wilson Assigned to Chris Wilson

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 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.

jussi-kalliokoski commented 11 years ago

Original comment by Jussi Kalliokoski on W3C Bugzilla. Thu, 13 Dec 2012 15:31:59 GMT

(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 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

jussi-kalliokoski commented 11 years ago

Original comment by Jussi Kalliokoski on W3C Bugzilla. Thu, 13 Dec 2012 16:21:16 GMT

(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

jussi-kalliokoski commented 11 years ago

Original comment by Chris Wilson on W3C Bugzilla. Thu, 13 Dec 2012 19:27:32 GMT

All issues represented here have been fixed.