W3C home > Mailing lists > Public > public-dap-commits@w3.org > December 2009

2009/dap/ReSpec.js/js respec.js,1.60,1.61

From: Robin Berjon via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 03 Dec 2009 13:50:07 +0000
To: public-dap-commits@w3.org
Message-Id: <E1NGC4N-00026g-Vz@lionel-hutz.w3.org>
Update of /sources/public/2009/dap/ReSpec.js/js
In directory hutz:/tmp/cvs-serv8040/js

Modified Files:
	respec.js 
Log Message:
option to remove in from params

Index: respec.js
===================================================================
RCS file: /sources/public/2009/dap/ReSpec.js/js/respec.js,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- respec.js	3 Dec 2009 12:36:55 -0000	1.60
+++ respec.js	3 Dec 2009 13:50:05 -0000	1.61
@@ -257,6 +257,7 @@
         if (!cfg.authors) cfg.authors = [];
         if (!cfg.inlineCSS) cfg.inlineCSS = false;
         if (!cfg.noIDLSorting) cfg.noIDLSorting = false;
+        if (!cfg.noIDLIn) cfg.noIDLIn = false;
         if (!cfg.maxTocLevel) cfg.maxTocLevel = 0;
         for (var k in cfg) this[k] = cfg[k];
         this.isRecTrack = this.recTrackStatus.indexOf(this.specStatus) >= 0;
@@ -711,7 +712,7 @@
         var infNames = [];
         for (var i = 0; i < idls.length; i++) {
             var idl = idls[i];
-            var w = new berjon.WebIDLProcessor({ noIDLSorting: this.noIDLSorting });
+            var w = new berjon.WebIDLProcessor({ noIDLSorting: this.noIDLSorting, noIDLIn: this.noIDLIn });
             var inf = w.definition(idl);
             var df = w.makeMarkup();
             idl.parentNode.replaceChild(df, idl);
@@ -1099,7 +1100,7 @@
                     var p = {};
                     prm = this.parseExtendedAttributes(prm, p);
                     // either up to end of string, or up to ,
-                    var re = /^\s*in\s+\b([^,]+)\s+\b([^,\s]+)\s*(?:,)?\s*/;
+                    var re = /^\s*(?:in\s+)?\b([^,]+)\s+\b([^,\s]+)\s*(?:,)?\s*/;
                     var match = re.exec(prm);
                     if (match) {
                         prm = prm.replace(re, "");
@@ -1497,11 +1498,12 @@
         var obj = this;
         str += meth.params.map(function (it) {
                                     var nullable = it.nullable ? "?" : "";
-                                    var optional = it.optional ? " optional " : " ";
+                                    var optional = it.optional ? "optional " : "";
                                     var arr = it.array ? "[]" : "";
+                                    var inp = obj.noIDLIn ? "" : "in ";
                                     var prm = "<span class='idlParam'>";
                                     if (it.extendedAttributes) prm += "[<span class='extAttr'>" + it.extendedAttributes + "</span>] ";
-                                    prm += "in" + optional + "<span class='idlParamType'>" + obj.writeDatatype(it.datatype) + arr + nullable + "</span> " +
+                                    prm += inp + optional + "<span class='idlParamType'>" + obj.writeDatatype(it.datatype) + arr + nullable + "</span> " +
                                     "<span class='idlParamName'>" + it.id + "</span>" +
                                     "</span>";
                                     return prm;
Received on Thursday, 3 December 2009 13:50:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 3 December 2009 13:50:17 GMT