[html5] r2621 - [] (0) Define callbacks using WebIDL. (bug 5814)

whatwg at whatwg.org whatwg at whatwg.org
Mon Dec 29 17:18:37 PST 2008


Author: ianh
Date: 2008-12-29 17:18:36 -0800 (Mon, 29 Dec 2008)
New Revision: 2621

Modified:
   index
   source
Log:
[] (0) Define callbacks using WebIDL. (bug 5814)

Modified: index
===================================================================
--- index	2008-12-30 00:58:26 UTC (rev 2620)
+++ index	2008-12-30 01:18:36 UTC (rev 2621)
@@ -17416,8 +17416,10 @@
            attribute boolean <a href=#dom-media-muted title=dom-media-muted>muted</a>;
 };
 
-// <dfn class=XXX id=cuerangecallback>CueRangeCallback</dfn> waiting on WebIDL
-</pre>
+[Callback=FunctionOnly, NoInterfaceObject]
+interface <dfn id=cuerangecallback>CueRangeCallback</dfn> {
+  void <span title=dom-CueRangeCallback-handleEvent>handleEvent</span>(in DOMString id);
+};</pre>
 
   <p>The <dfn id=media-element-attributes>media element attributes</dfn>, <code title=attr-media-src><a href=#attr-media-src>src</a></code>, <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code>, <code title=attr-media-loop><a href=#attr-media-loop>loop</a></code>, and <code title=attr-media-controls><a href=#attr-media-controls>controls</a></code>, apply to all <a href=#media-element title="media element">media elements</a>. They are defined in
   this section.</p>
@@ -33296,11 +33298,8 @@
            attribute <span>EventListener</span> <a href=#handler-onstorage title=handler-onstorage>onstorage</a>;
            attribute <span>EventListener</span> <a href=#handler-onsubmit title=handler-onsubmit>onsubmit</a>;
            attribute <span>EventListener</span> <a href=#handler-onunload title=handler-onunload>onunload</a>;
-};
+};</pre>
 
-// <dfn class=XXX id=voidcallback>VoidCallback</dfn> waiting on WebIDL
-</pre>
-
  <!-- XXX http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_window.asp
           http://www.mozilla.org/docs/dom/domref/dom_window_ref.html
           http://lxr.mozilla.org/mozilla/source/dom/public/idl/base/nsIDOMWindow.idl - scrollBy, etc
@@ -39113,17 +39112,24 @@
   increase the quota every five megabytes.</p>
 
   <pre class=idl>interface <dfn id=database>Database</dfn> {
-  void <a href=#dom-database-transaction title=dom-database-transaction>transaction</a>(in <a href=#sqltransactioncallback>SQLTransactionCallback</a> callback, [Optional] in <a href=#sqltransactionerrorcallback>SQLTransactionErrorCallback</a> errorCallback, [Optional] in <a href=#voidcallback>VoidCallback</a> successCallback);
-  void <a href=#dom-database-readtransaction title=dom-database-readTransaction>readTransaction</a>(in <a href=#sqltransactioncallback>SQLTransactionCallback</a> callback, [Optional] in <a href=#sqltransactionerrorcallback>SQLTransactionErrorCallback</a> errorCallback, [Optional] in <a href=#voidcallback>VoidCallback</a> successCallback);
+  void <a href=#dom-database-transaction title=dom-database-transaction>transaction</a>(in <a href=#sqltransactioncallback>SQLTransactionCallback</a> callback, [Optional] in <a href=#sqltransactionerrorcallback>SQLTransactionErrorCallback</a> errorCallback, [Optional] in <a href=#sqlvoidcallback>SQLVoidCallback</a> successCallback);
+  void <a href=#dom-database-readtransaction title=dom-database-readTransaction>readTransaction</a>(in <a href=#sqltransactioncallback>SQLTransactionCallback</a> callback, [Optional] in <a href=#sqltransactionerrorcallback>SQLTransactionErrorCallback</a> errorCallback, [Optional] in <a href=#sqlvoidcallback>SQLVoidCallback</a> successCallback);
 
   readonly attribute DOMString <a href=#dom-database-version title=dom-database-version>version</a>;
-  void <a href=#dom-database-changeversion title=dom-database-changeVersion>changeVersion</a>(in DOMString oldVersion, in DOMString newVersion, in <a href=#sqltransactioncallback>SQLTransactionCallback</a> callback, in <a href=#sqltransactionerrorcallback>SQLTransactionErrorCallback</a> errorCallback, in <a href=#voidcallback>VoidCallback</a> successCallback);
+  void <a href=#dom-database-changeversion title=dom-database-changeVersion>changeVersion</a>(in DOMString oldVersion, in DOMString newVersion, in <a href=#sqltransactioncallback>SQLTransactionCallback</a> callback, in <a href=#sqltransactionerrorcallback>SQLTransactionErrorCallback</a> errorCallback, in <a href=#sqlvoidcallback>SQLVoidCallback</a> successCallback);
 };
 
+[Callback=FunctionOnly, NoInterfaceObject]
+interface <dfn id=sqlvoidcallback>SQLVoidCallback</dfn> {
+  void <span title=dom-sqlvoidcallback-handleEvent>handleEvent</span>();
+};
+
+[Callback=FunctionOnly, NoInterfaceObject]
 interface <dfn id=sqltransactioncallback>SQLTransactionCallback</dfn> {
   void <span title=dom-sqltransactioncallback-handleEvent>handleEvent</span>(in <a href=#sqltransaction>SQLTransaction</a> transaction);
 };
 
+[Callback=FunctionOnly, NoInterfaceObject]
 interface <dfn id=sqltransactionerrorcallback>SQLTransactionErrorCallback</dfn> {
   void <span title=dom-sqltransactionerrorcallback-handleEvent>handleEvent</span>(in <a href=#sqlerror>SQLError</a> error);
 };</pre>
@@ -39195,10 +39201,12 @@
   void <a href=#dom-sqltransaction-executesql title=dom-sqltransaction-executeSql>executeSql</a>(in DOMString sqlStatement, in <a href=#objectarray>ObjectArray</a> arguments, in <a href=#sqlstatementcallback>SQLStatementCallback</a> callback, in <a href=#sqlstatementerrorcallback>SQLStatementErrorCallback</a> errorCallback);
 };
 
+[Callback=FunctionOnly, NoInterfaceObject]
 interface <dfn id=sqlstatementcallback>SQLStatementCallback</dfn> {
   void <span title=dom-sqlstatementcallback-handleEvent>handleEvent</span>(in <a href=#sqltransaction>SQLTransaction</a> transaction, in <a href=#sqlresultset>SQLResultSet</a> resultSet);
 };
 
+[Callback=FunctionOnly, NoInterfaceObject]
 interface <dfn id=sqlstatementerrorcallback>SQLStatementErrorCallback</dfn> {
   boolean <span title=dom-sqlstatementerrorcallback-handleEvent>handleEvent</span>(in <a href=#sqltransaction>SQLTransaction</a> transaction, in <a href=#sqlerror>SQLError</a> error);
 };</pre>
@@ -55038,10 +55046,10 @@
   void <a href=#dom-windowtimers-clearinterval title=dom-windowtimers-clearInterval>clearInterval</a>(in long handle);
 };
 
+[Callback=FunctionOnly, NoInterfaceObject]
 interface <dfn id=timeouthandler>TimeoutHandler</dfn> {
-  void handleEvent([Variadic] in any args);
-};
-</pre>
+  void <span title=dom-TimeoutHandler-handleEvent>handleEvent</span>([Variadic] in any args);
+};</pre>
 
   <p>The <code title=dom-windowtimers-setTimeout><a href=#dom-windowtimers-settimeout>setTimeout</a></code>
   and <code title=dom-windowtimers-setInterval><a href=#dom-windowtimers-setinterval>setInterval</a></code>

Modified: source
===================================================================
--- source	2008-12-30 00:58:26 UTC (rev 2620)
+++ source	2008-12-30 01:18:36 UTC (rev 2621)
@@ -18688,8 +18688,10 @@
            attribute boolean <span title="dom-media-muted">muted</span>;
 };
 
-// <dfn class="XXX">CueRangeCallback</dfn> waiting on WebIDL
-</pre>
+[Callback=FunctionOnly, NoInterfaceObject]
+interface <dfn>CueRangeCallback</dfn> {
+  void <span title="dom-CueRangeCallback-handleEvent">handleEvent</span>(in DOMString id);
+};</pre>
 
   <p>The <dfn>media element attributes</dfn>, <code
   title="attr-media-src">src</code>, <code
@@ -37810,11 +37812,8 @@
            attribute <span>EventListener</span> <span title="handler-onstorage">onstorage</span>;
            attribute <span>EventListener</span> <span title="handler-onsubmit">onsubmit</span>;
            attribute <span>EventListener</span> <span title="handler-onunload">onunload</span>;
-};
+};</pre>
 
-// <dfn class="XXX">VoidCallback</dfn> waiting on WebIDL
-</pre>
-
  <!-- XXX http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_window.asp
           http://www.mozilla.org/docs/dom/domref/dom_window_ref.html
           http://lxr.mozilla.org/mozilla/source/dom/public/idl/base/nsIDOMWindow.idl - scrollBy, etc
@@ -44505,17 +44504,24 @@
   increase the quota every five megabytes.</p>
 
   <pre class="idl">interface <dfn>Database</dfn> {
-  void <span title="dom-database-transaction">transaction</span>(in <span>SQLTransactionCallback</span> callback, [Optional] in <span>SQLTransactionErrorCallback</span> errorCallback, [Optional] in <span>VoidCallback</span> successCallback);
-  void <span title="dom-database-readTransaction">readTransaction</span>(in <span>SQLTransactionCallback</span> callback, [Optional] in <span>SQLTransactionErrorCallback</span> errorCallback, [Optional] in <span>VoidCallback</span> successCallback);
+  void <span title="dom-database-transaction">transaction</span>(in <span>SQLTransactionCallback</span> callback, [Optional] in <span>SQLTransactionErrorCallback</span> errorCallback, [Optional] in <span>SQLVoidCallback</span> successCallback);
+  void <span title="dom-database-readTransaction">readTransaction</span>(in <span>SQLTransactionCallback</span> callback, [Optional] in <span>SQLTransactionErrorCallback</span> errorCallback, [Optional] in <span>SQLVoidCallback</span> successCallback);
 
   readonly attribute DOMString <span title="dom-database-version">version</span>;
-  void <span title="dom-database-changeVersion">changeVersion</span>(in DOMString oldVersion, in DOMString newVersion, in <span>SQLTransactionCallback</span> callback, in <span>SQLTransactionErrorCallback</span> errorCallback, in <span>VoidCallback</span> successCallback);
+  void <span title="dom-database-changeVersion">changeVersion</span>(in DOMString oldVersion, in DOMString newVersion, in <span>SQLTransactionCallback</span> callback, in <span>SQLTransactionErrorCallback</span> errorCallback, in <span>SQLVoidCallback</span> successCallback);
 };
 
+[Callback=FunctionOnly, NoInterfaceObject]
+interface <dfn>SQLVoidCallback</dfn> {
+  void <span title="dom-sqlvoidcallback-handleEvent">handleEvent</span>();
+};
+
+[Callback=FunctionOnly, NoInterfaceObject]
 interface <dfn>SQLTransactionCallback</dfn> {
   void <span title="dom-sqltransactioncallback-handleEvent">handleEvent</span>(in <span>SQLTransaction</span> transaction);
 };
 
+[Callback=FunctionOnly, NoInterfaceObject]
 interface <dfn>SQLTransactionErrorCallback</dfn> {
   void <span title="dom-sqltransactionerrorcallback-handleEvent">handleEvent</span>(in <span>SQLError</span> error);
 };</pre>
@@ -44605,10 +44611,12 @@
   void <span title="dom-sqltransaction-executeSql">executeSql</span>(in DOMString sqlStatement, in <span>ObjectArray</span> arguments, in <span>SQLStatementCallback</span> callback, in <span>SQLStatementErrorCallback</span> errorCallback);
 };
 
+[Callback=FunctionOnly, NoInterfaceObject]
 interface <dfn>SQLStatementCallback</dfn> {
   void <span title="dom-sqlstatementcallback-handleEvent">handleEvent</span>(in <span>SQLTransaction</span> transaction, in <span>SQLResultSet</span> resultSet);
 };
 
+[Callback=FunctionOnly, NoInterfaceObject]
 interface <dfn>SQLStatementErrorCallback</dfn> {
   boolean <span title="dom-sqlstatementerrorcallback-handleEvent">handleEvent</span>(in <span>SQLTransaction</span> transaction, in <span>SQLError</span> error);
 };</pre>
@@ -60142,10 +60150,10 @@
   void <span title="dom-windowtimers-clearInterval">clearInterval</span>(in long handle);
 };
 
+[Callback=FunctionOnly, NoInterfaceObject]
 interface <dfn>TimeoutHandler</dfn> {
-  void handleEvent([Variadic] in any args);
-};
-</pre>
+  void <span title="dom-TimeoutHandler-handleEvent">handleEvent</span>([Variadic] in any args);
+};</pre>
 
   <p>The <code title="dom-windowtimers-setTimeout">setTimeout</code>
   and <code title="dom-windowtimers-setInterval">setInterval</code>




More information about the Commit-Watchers mailing list