[Bug 14916] New: WebIDL has no function type


           Summary: WebIDL has no function type
           Product: WebAppsWG
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: WebIDL
        AssignedTo: cam@mcc.id.au
        ReportedBy: ayg@aryeh.name
         QAContact: member-webapi-cvs@w3.org
                CC: mike@w3.org, public-script-coord@w3.org

HTML has tons of IDL attributes like

  [TreatNonCallableAsNull] attribute Function? onabort;

Function is actually an interface it defines:


This is very weird, and probably contradicts ES in some details (like whether
the .call property of the prototype is configurable).  It would make more sense
for WebIDL to have a dedicated function type.  The algorithm for converting to
a function should probably return null if the thing passed in isn't callable,
so the above could become just

  attribute function? onabort;

since every single usage of Function? in HTML seems to use
[TreatNonCallableAsNull], so it may as well just be the behavior all the time.

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Wednesday, 23 November 2011 18:54:07 UTC