OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 // This file contains support for URI manipulations written in | |
6 // JavaScript. | |
7 | |
8 (function(global, utils) { | |
9 | |
10 "use strict"; | |
11 | |
12 %CheckIsBootstrapping(); | |
13 | |
14 // ------------------------------------------------------------------- | |
15 // Define exported functions. | |
16 | |
17 // ECMA-262 - B.2.1. | |
18 function URIEscapeJS(s) { | |
19 return %URIEscape(s); | |
20 } | |
21 | |
22 // ECMA-262 - B.2.2. | |
23 function URIUnescapeJS(s) { | |
24 return %URIUnescape(s); | |
25 } | |
26 | |
27 // ------------------------------------------------------------------- | |
28 // Install exported functions. | |
29 | |
30 // Set up non-enumerable URI functions on the global object and set | |
31 // their names. | |
32 utils.InstallFunctions(global, DONT_ENUM, [ | |
33 "escape", URIEscapeJS, | |
34 "unescape", URIUnescapeJS | |
35 ]); | |
36 | |
37 }) | |
OLD | NEW |