[Bug 20510] New: send(sequence<short> data) should just be send(any data)

https://www.w3.org/Bugs/Public/show_bug.cgi?id=20510

            Bug ID: 20510
           Summary: send(sequence<short> data) should just be send(any
                    data)
    Classification: Unclassified
           Product: AudioWG
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: MIDI API
          Assignee: dave.null@w3.org
          Reporter: w3c@marcosc.com
        QA Contact: public-audio@w3.org

If the first argument of send() is going to be coerced in to a Uint8Array, then
send should just take any as a type. That avoids a whole bunch of unnecessary
checks that will be performed when whatever value if thrown into new
Uint8Array().

For example:

send({}) === []
send(function(){}) === []
send(Node) === []

send("") === [0]
send([" "]) === []

send([undefined,null,Node,Array, [1,23,432]]) === [0, 0, 0, 0, 0]

This one is important:
send(["100", "200", "300"]) === [100, 200, 44]


And so on…

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Monday, 24 December 2012 08:23:53 UTC