W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2012

[Bug 16014] Make it clear that callbacks should only be used for Function

From: <bugzilla@jessica.w3.org>
Date: Thu, 23 Feb 2012 01:54:21 +0000
To: public-script-coord@w3.org
Message-Id: <E1S0Nsz-00008d-VZ@jessica.w3.org>

Cameron McCormack <cam@mcc.id.au> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX

--- Comment #6 from Cameron McCormack <cam@mcc.id.au> 2012-02-23 01:54:20 UTC ---
(In reply to comment #5)
> I have never seen Cameron actually do any editing on that spec.

I did write the initial text before it went into the repo there, but it's true
James has done most of the work since.


> And I thought I'd raised an issue on that use of callback.  I did it again just
> now, in case I hadn't before....

Note that this all came about due to some people preferring the old [Callback]
and others writing [Callback=FunctionOnly], and it was clear that we needed to
have some consistency across the platform.  At TPAC I believe we agreed to have
the [Callback=FunctionOnly] behaviour be the default (IIRC).  As part of
simplifying how to write the IDL for callbacks, I introduced the callback
syntax for a terser way of doing:

  interface Blah {
    void handleEvent(Whatever blah);

and at the same time to simplify the "user object" vs "platform object"
distinction in the spec.  I think it's useful for Web IDL to includes
notes/warnings such as the one we have about the use of callback interfaces, so
that we have something to point to when arguing for consistency between
specifications written by different people.

I don't think it's helpful to describe some peoples' objections to the decision
to have the callback syntax not support the object-with-property style as a
"longstanding veto", and remember that it is rare for Mozilla people to have a
unified, coordinated view on technical issues.

Anyway, I was the one who made the changes to the requestAnimationFrame spec to
update it to use the new callback syntax before it was published as LCWD.  Note
that before this the spec did use [Callback=FunctionOnly].

What I would ask people to do is if you wish to argue against the decision, to
reply and argue against my mail where I worked through the pros and cons of the
different approaches:


Configure bugmail: https://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 Thursday, 23 February 2012 01:54:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:05 UTC