Fossil

Check-in [2018954b]
Login

Check-in [2018954b]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fixed a recursion bug in fossil.dom.append(e,array) (currently unused, but will be soon).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 2018954b3f122599cd91f100fc4bd82aa9c1d1019f730c9c55cfc2e8e9443e43
User & Date: drh 2020-08-16 15:51:38
Context
2020-08-16
15:52
Reworked fossil.toast to support normal/warning/error-level toasts. Alas, animating a toast's appearance and disappearance proved to be beyond my current skills. ... (check-in: 4368f529 user: stephan tags: trunk)
15:51
Fixed a recursion bug in fossil.dom.append(e,array) (currently unused, but will be soon). ... (check-in: 2018954b user: drh tags: trunk)
15:51
Disable HTTPS redirect for the "test-http" command. That command is used by the "ssh:" transport method and redirects to https will break ssh: transport. ... (check-in: ea6365a8 user: drh tags: trunk)
15:49
Fixed a recursion bug in fossil.dom.append(e,array) (currently unused, but will be soon). ... (Closed-Leaf check-in: 154f6484 user: stephan tags: bad-merge)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/fossil.dom.js.

216
217
218
219
220
221
222
223
224
225
226


227
228
229
230
231
232
233
  */
  dom.append = function f(parent/*,...*/){
    const a = argsToArray(arguments);
    a.shift();
    for(let i in a) {
      var e = a[i];
      if(isArray(e) || e.forEach){
        e.forEach((x)=>f.call(this, parent,e));
        continue;
      }
      if('string'===typeof e || 'number'===typeof e) e = this.text(e);


      parent.appendChild(e);
    }
    return parent;
  };

  dom.input = function(type){
    return this.attr(this.create('input'), 'type', type);







|


|
>
>







216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
  */
  dom.append = function f(parent/*,...*/){
    const a = argsToArray(arguments);
    a.shift();
    for(let i in a) {
      var e = a[i];
      if(isArray(e) || e.forEach){
        e.forEach((x)=>f.call(this, parent,x));
        continue;
      }
      if('string'===typeof e
         || 'number'===typeof e
         || 'boolean'===typeof e) e = this.text(e);
      parent.appendChild(e);
    }
    return parent;
  };

  dom.input = function(type){
    return this.attr(this.create('input'), 'type', type);