OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 */ | 205 */ |
206 InjectedScript.closureTypes = { __proto__: null }; | 206 InjectedScript.closureTypes = { __proto__: null }; |
207 InjectedScript.closureTypes["local"] = "Local"; | 207 InjectedScript.closureTypes["local"] = "Local"; |
208 InjectedScript.closureTypes["closure"] = "Closure"; | 208 InjectedScript.closureTypes["closure"] = "Closure"; |
209 InjectedScript.closureTypes["catch"] = "Catch"; | 209 InjectedScript.closureTypes["catch"] = "Catch"; |
210 InjectedScript.closureTypes["block"] = "Block"; | 210 InjectedScript.closureTypes["block"] = "Block"; |
211 InjectedScript.closureTypes["script"] = "Script"; | 211 InjectedScript.closureTypes["script"] = "Script"; |
212 InjectedScript.closureTypes["with"] = "With Block"; | 212 InjectedScript.closureTypes["with"] = "With Block"; |
213 InjectedScript.closureTypes["global"] = "Global"; | 213 InjectedScript.closureTypes["global"] = "Global"; |
214 InjectedScript.closureTypes["eval"] = "Eval"; | 214 InjectedScript.closureTypes["eval"] = "Eval"; |
| 215 InjectedScript.closureTypes["module"] = "Module"; |
215 | 216 |
216 InjectedScript.prototype = { | 217 InjectedScript.prototype = { |
217 /** | 218 /** |
218 * @param {*} object | 219 * @param {*} object |
219 * @return {boolean} | 220 * @return {boolean} |
220 */ | 221 */ |
221 isPrimitiveValue: function(object) | 222 isPrimitiveValue: function(object) |
222 { | 223 { |
223 // FIXME(33716): typeof document.all is always 'undefined'. | 224 // FIXME(33716): typeof document.all is always 'undefined'. |
224 return InjectedScript.primitiveTypes[typeof object] && !this._isHTMLAllC
ollection(object); | 225 return InjectedScript.primitiveTypes[typeof object] && !this._isHTMLAllC
ollection(object); |
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1061 return string.substr(0, leftHalf) + "\u2026" + string.substr(string.
length - rightHalf, rightHalf); | 1062 return string.substr(0, leftHalf) + "\u2026" + string.substr(string.
length - rightHalf, rightHalf); |
1062 } | 1063 } |
1063 return string.substr(0, maxLength) + "\u2026"; | 1064 return string.substr(0, maxLength) + "\u2026"; |
1064 }, | 1065 }, |
1065 | 1066 |
1066 __proto__: null | 1067 __proto__: null |
1067 } | 1068 } |
1068 | 1069 |
1069 return injectedScript; | 1070 return injectedScript; |
1070 }) | 1071 }) |
OLD | NEW |