Show
Ignore:
Timestamp:
06/15/08 16:04:18 (7 years ago)
Author:
dankogai
Message:

converts JSON and DOM, back and forth

Location:
lang/javascript/dom2json
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/dom2json/dom2json.html

    r13973 r14020  
    11<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
    2 <!-- $Id: dom2json.html,v 0.1 2008/06/14 19:58:00 dankogai Exp dankogai $ --> 
     2<!-- $Id: dom2json.html,v 0.1 2008/06/14 19:58:00 dankogai Exp $ --> 
    33<html> 
    44<head> 
  • lang/javascript/dom2json/dom2json.js

    r13973 r14020  
    11/* 
    2  * $Id: dom2json.js,v 0.1 2008/06/14 19:58:00 dankogai Exp dankogai $ 
     2 * $Id: dom2json.js,v 0.2 2008/06/15 07:04:10 dankogai Exp dankogai $ 
    33 */ 
    44(function(){ 
     
    1818            json.push(attr); 
    1919        } 
    20         if (! dom.hasChildNodes) return json; 
     20        if (! dom.hasChildNodes()) return json; 
    2121        var kids = dom.childNodes; 
    2222        for (var i = 0, l = kids.length; i < l; i++){