| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 * @param {string=} listenerType | 572 * @param {string=} listenerType |
| 573 */ | 573 */ |
| 574 WebInspector.EventListener = function(target, type, useCapture, handler, origina
lHandler, location, removeFunction, listenerType) | 574 WebInspector.EventListener = function(target, type, useCapture, handler, origina
lHandler, location, removeFunction, listenerType) |
| 575 { | 575 { |
| 576 WebInspector.SDKObject.call(this, target); | 576 WebInspector.SDKObject.call(this, target); |
| 577 this._type = type; | 577 this._type = type; |
| 578 this._useCapture = useCapture; | 578 this._useCapture = useCapture; |
| 579 this._handler = handler; | 579 this._handler = handler; |
| 580 this._originalHandler = originalHandler || handler; | 580 this._originalHandler = originalHandler || handler; |
| 581 this._location = location; | 581 this._location = location; |
| 582 this._sourceURL = location.script().contentURL(); | 582 var script = location.script(); |
| 583 this._sourceURL = script ? script.contentURL() : ""; |
| 583 this._removeFunction = removeFunction; | 584 this._removeFunction = removeFunction; |
| 584 this._listenerType = listenerType || "normal"; | 585 this._listenerType = listenerType || "normal"; |
| 585 } | 586 } |
| 586 | 587 |
| 587 WebInspector.EventListener.prototype = { | 588 WebInspector.EventListener.prototype = { |
| 588 /** | 589 /** |
| 589 * @return {string} | 590 * @return {string} |
| 590 */ | 591 */ |
| 591 type: function() | 592 type: function() |
| 592 { | 593 { |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 /** | 688 /** |
| 688 * @param {string} listenerType | 689 * @param {string} listenerType |
| 689 */ | 690 */ |
| 690 setListenerType: function(listenerType) | 691 setListenerType: function(listenerType) |
| 691 { | 692 { |
| 692 this._listenerType = listenerType; | 693 this._listenerType = listenerType; |
| 693 }, | 694 }, |
| 694 | 695 |
| 695 __proto__: WebInspector.SDKObject.prototype | 696 __proto__: WebInspector.SDKObject.prototype |
| 696 } | 697 } |
| OLD | NEW |