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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 * @const | 230 * @const |
231 */ | 231 */ |
232 var domAttributesWithObservableSideEffectOnGet = nullifyObjectProto({}); | 232 var domAttributesWithObservableSideEffectOnGet = nullifyObjectProto({}); |
233 domAttributesWithObservableSideEffectOnGet["Request"] = nullifyObjectProto({}); | 233 domAttributesWithObservableSideEffectOnGet["Request"] = nullifyObjectProto({}); |
234 domAttributesWithObservableSideEffectOnGet["Request"]["body"] = true; | 234 domAttributesWithObservableSideEffectOnGet["Request"]["body"] = true; |
235 domAttributesWithObservableSideEffectOnGet["Response"] = nullifyObjectProto({}); | 235 domAttributesWithObservableSideEffectOnGet["Response"] = nullifyObjectProto({}); |
236 domAttributesWithObservableSideEffectOnGet["Response"]["body"] = true; | 236 domAttributesWithObservableSideEffectOnGet["Response"]["body"] = true; |
237 | 237 |
238 /** | 238 /** |
239 * @param {!Object} object | 239 * @param {!Object} object |
240 * @param {!string} attribute | 240 * @param {string} attribute |
241 * @return {boolean} | 241 * @return {boolean} |
242 */ | 242 */ |
243 function doesAttributeHaveObservableSideEffectOnGet(object, attribute) | 243 function doesAttributeHaveObservableSideEffectOnGet(object, attribute) |
244 { | 244 { |
245 for (var interfaceName in domAttributesWithObservableSideEffectOnGet) { | 245 for (var interfaceName in domAttributesWithObservableSideEffectOnGet) { |
246 var isInstance = InjectedScriptHost.suppressWarningsAndCallFunction(func
tion(object, interfaceName) { | 246 var isInstance = InjectedScriptHost.suppressWarningsAndCallFunction(func
tion(object, interfaceName) { |
247 return typeof window[interfaceName] === "function" && object instanc
eof window[interfaceName]; | 247 return /* suppressBlacklist */ typeof inspectedWindow[interfaceName]
=== "function" && object instanceof inspectedWindow[interfaceName]; |
248 }, null, [object, interfaceName]); | 248 }, null, [object, interfaceName]); |
249 if (isInstance) { | 249 if (isInstance) { |
250 return attribute in domAttributesWithObservableSideEffectOnGet[inter
faceName]; | 250 return attribute in domAttributesWithObservableSideEffectOnGet[inter
faceName]; |
251 } | 251 } |
252 } | 252 } |
253 return false; | 253 return false; |
254 } | 254 } |
255 | 255 |
256 /** | 256 /** |
257 * @constructor | 257 * @constructor |
(...skipping 1706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1964 */ | 1964 */ |
1965 _logEvent: function(event) | 1965 _logEvent: function(event) |
1966 { | 1966 { |
1967 inspectedWindow.console.log(event.type, event); | 1967 inspectedWindow.console.log(event.type, event); |
1968 } | 1968 } |
1969 } | 1969 } |
1970 | 1970 |
1971 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); | 1971 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); |
1972 return injectedScript; | 1972 return injectedScript; |
1973 }) | 1973 }) |
OLD | NEW |