W3C home > Mailing lists > Public > public-webapps-bugzilla@w3.org > February 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-webapps-bugzilla@w3.org
Message-Id: <E1S0Nsz-00008a-Sm@jessica.w3.org>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=16014

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.

http://dvcs.w3.org/hg/webperf/annotate/843f6eb989ba/specs/RequestAnimationFrame/Overview.xml

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

  [Callback=FunctionOnly]
  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:

  http://lists.w3.org/Archives/Public/public-script-coord/2011OctDec/0319.html
  http://lists.w3.org/Archives/Public/public-script-coord/2011OctDec/0368.html

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Thursday, 23 February 2012 01:54:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 23 February 2012 01:54:27 GMT