OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file contains support for URI manipulations written in | 5 // This file contains support for URI manipulations written in |
6 // JavaScript. | 6 // JavaScript. |
7 | 7 |
8 (function() { | 8 (function() { |
9 | 9 |
10 "use strict"; | 10 "use strict"; |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 }; | 369 }; |
370 var string = ToString(component); | 370 var string = ToString(component); |
371 return Encode(string, unescapePredicate); | 371 return Encode(string, unescapePredicate); |
372 } | 372 } |
373 | 373 |
374 // ------------------------------------------------------------------- | 374 // ------------------------------------------------------------------- |
375 // Install exported functions. | 375 // Install exported functions. |
376 | 376 |
377 // Set up non-enumerable URI functions on the global object and set | 377 // Set up non-enumerable URI functions on the global object and set |
378 // their names. | 378 // their names. |
379 InstallFunctions(global, DONT_ENUM, GlobalArray( | 379 InstallFunctions(global, DONT_ENUM, [ |
380 "escape", URIEscapeJS, | 380 "escape", URIEscapeJS, |
381 "unescape", URIUnescapeJS, | 381 "unescape", URIUnescapeJS, |
382 "decodeURI", URIDecode, | 382 "decodeURI", URIDecode, |
383 "decodeURIComponent", URIDecodeComponent, | 383 "decodeURIComponent", URIDecodeComponent, |
384 "encodeURI", URIEncode, | 384 "encodeURI", URIEncode, |
385 "encodeURIComponent", URIEncodeComponent | 385 "encodeURIComponent", URIEncodeComponent |
386 )); | 386 ]); |
387 | 387 |
388 })(); | 388 })(); |
OLD | NEW |