Changeset 26794 for lang/javascript/JSONHttpRequest
- Timestamp:
- 12/15/08 19:10:00 (4 years ago)
- Location:
- lang/javascript/JSONHttpRequest/trunk
- Files:
-
- 4 modified
-
. (modified) (1 prop)
-
lib/JSONHttpRequest.js (modified) (3 diffs)
-
tests/index.html (modified) (1 diff, 1 prop)
-
tests/use.html (modified) (2 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/JSONHttpRequest/trunk
-
Property
svn:ignore set
to
Build
MANIFEST.bak
META.yml
_build
-
Property
svn:ignore set
to
-
lang/javascript/JSONHttpRequest/trunk/lib/JSONHttpRequest.js
r26783 r26794 1 try {1 try { 2 2 if (typeof JSONScriptRequest == 'undefined') { 3 3 if (typeof JSAN != 'undefined') { … … 31 31 32 32 send: function(data) { 33 var headers = JSONScriptRequest._toSource(this._requestHeaders).replace(/^\( /, '').replace(/\)$/, '');33 var headers = JSONScriptRequest._toSource(this._requestHeaders).replace(/^\(|\)$/g, ''); 34 34 this._url += (this._url.indexOf('?') == -1 ? '?' : '&') 35 35 + 'JSONHttpRequest=' + encodeURIComponent(headers); … … 47 47 this._readystatechange(4); 48 48 } else { 49 this.responseText = JSONScriptRequest._toSource(json.body).replace(/^\( /, '').replace(/\)$/, '');49 this.responseText = JSONScriptRequest._toSource(json.body).replace(/^\(|\)$/g, ''); 50 50 this._readystatechange(3); 51 51 -
lang/javascript/JSONHttpRequest/trunk/tests/index.html
- Property svn:mime-type set to text/html; chatset=UTF-8
r26783 r26794 4 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 5 5 <meta http-equiv="Content-Script-Type" content="text/javascript"> 6 <title>JSONHttpRequest test</title> 6 7 <script type="text/javascript" src="lib/JSAN.js"></script> 7 8 </head> 8 9 <body> 9 <script type="text/javascript"> 10 // <![CDATA[ 10 <script type="text/javascript"><!-- 11 11 var jsan = new JSAN('lib'); 12 12 jsan.use('Test.Harness.Browser'); 13 13 new Test.Harness.Browser().runTests('use.html'); 14 // ]]>14 // --> 15 15 </script> 16 16 </body> -
lang/javascript/JSONHttpRequest/trunk/tests/use.html
- Property svn:mime-type set to text/html; chatset=UTF-8
r26783 r26794 4 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 5 5 <meta http-equiv="Content-Script-Type" content="text/javascript"> 6 <title>JSONHttpRequest test use</title> 6 7 <script type="text/javascript" src="lib/JSAN.js"></script> 7 8 </head> 8 9 <body> 9 10 <pre id="test"> 10 <script type="text/javascript"> 11 // <![CDATA[ 11 <script type="text/javascript"><!-- 12 12 JSAN.addRepository('lib', '../../JSONScriptRequest/lib', '../lib'); 13 13 JSAN.use('Test.More'); … … 17 17 JSAN.use('JSONHttpRequest'); 18 18 19 isnt( typeof JSONHttpRequest, 'undefined', 'JSONHttpRequest is defined');19 isnt(typeof JSONHttpRequest, 'undefined', 'JSONHttpRequest is defined'); 20 20 var req = new JSONHttpRequest({}); 21 21 isaOK(req, 'JSONHttpRequest'); 22 22 isaOK(req, 'JSONScriptRequest'); 23 23 24 // ]]>24 // --> 25 25 </script> 26 26 </pre>
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)