Show
Ignore:
Timestamp:
12/15/08 19:10:00 (6 years ago)
Author:
drry
Message:
  • fixed HTML4.
  • fixed regexes.
  • added subversion properties.
  • et cetera.
Location:
lang/javascript/JSONHttpRequest/trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/JSONHttpRequest/trunk

    • Property svn:ignore set to
      Build
      MANIFEST.bak
      META.yml
      _build
  • lang/javascript/JSONHttpRequest/trunk/lib/JSONHttpRequest.js

    r26783 r26794  
    1 try{ 
     1try { 
    22    if (typeof JSONScriptRequest == 'undefined') { 
    33        if (typeof JSAN != 'undefined') { 
     
    3131 
    3232     send: function(data) { 
    33          var headers = JSONScriptRequest._toSource(this._requestHeaders).replace(/^\(/, '').replace(/\)$/, ''); 
     33         var headers = JSONScriptRequest._toSource(this._requestHeaders).replace(/^\(|\)$/g, ''); 
    3434         this._url += (this._url.indexOf('?') == -1 ? '?' : '&') 
    3535             + 'JSONHttpRequest=' + encodeURIComponent(headers); 
     
    4747             this._readystatechange(4); 
    4848         } else { 
    49              this.responseText = JSONScriptRequest._toSource(json.body).replace(/^\(/, '').replace(/\)$/, ''); 
     49             this.responseText = JSONScriptRequest._toSource(json.body).replace(/^\(|\)$/g, ''); 
    5050             this._readystatechange(3); 
    5151 
  • lang/javascript/JSONHttpRequest/trunk/tests/index.html

    • Property svn:mime-type set to text/html; chatset=UTF-8
    r26783 r26794  
    44    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
    55    <meta http-equiv="Content-Script-Type" content="text/javascript"> 
     6    <title>JSONHttpRequest test</title> 
    67    <script type="text/javascript" src="lib/JSAN.js"></script> 
    78  </head> 
    89  <body> 
    9     <script type="text/javascript"> 
    10 // <![CDATA[ 
     10    <script type="text/javascript"><!-- 
    1111var jsan = new JSAN('lib'); 
    1212jsan.use('Test.Harness.Browser'); 
    1313new Test.Harness.Browser().runTests('use.html'); 
    14 // ]]> 
     14// --> 
    1515    </script> 
    1616  </body> 
  • lang/javascript/JSONHttpRequest/trunk/tests/use.html

    • Property svn:mime-type set to text/html; chatset=UTF-8
    r26783 r26794  
    44    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
    55    <meta http-equiv="Content-Script-Type" content="text/javascript"> 
     6    <title>JSONHttpRequest test use</title> 
    67    <script type="text/javascript" src="lib/JSAN.js"></script> 
    78  </head> 
    89  <body> 
    910    <pre id="test"> 
    10       <script type="text/javascript"> 
    11 // <![CDATA[ 
     11      <script type="text/javascript"><!-- 
    1212JSAN.addRepository('lib', '../../JSONScriptRequest/lib', '../lib'); 
    1313JSAN.use('Test.More'); 
     
    1717JSAN.use('JSONHttpRequest'); 
    1818 
    19 isnt( typeof JSONHttpRequest, 'undefined', 'JSONHttpRequest is defined' ); 
     19isnt(typeof JSONHttpRequest, 'undefined', 'JSONHttpRequest is defined'); 
    2020var req = new JSONHttpRequest({}); 
    2121isaOK(req, 'JSONHttpRequest'); 
    2222isaOK(req, 'JSONScriptRequest'); 
    2323 
    24 // ]]> 
     24// --> 
    2525      </script> 
    2626    </pre>