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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 } | 491 } |
492 | 492 |
493 /** | 493 /** |
494 * @constructor | 494 * @constructor |
495 * @extends {WebInspector.SDKObject} | 495 * @extends {WebInspector.SDKObject} |
496 * @param {!WebInspector.Target} target | 496 * @param {!WebInspector.Target} target |
497 * @param {string} type | 497 * @param {string} type |
498 * @param {boolean} useCapture | 498 * @param {boolean} useCapture |
499 * @param {?WebInspector.RemoteObject} handler | 499 * @param {?WebInspector.RemoteObject} handler |
500 * @param {!WebInspector.DebuggerModel.Location} location | 500 * @param {!WebInspector.DebuggerModel.Location} location |
| 501 * @param {string=} listenerType |
501 */ | 502 */ |
502 WebInspector.EventListener = function(target, type, useCapture, handler, locatio
n) | 503 WebInspector.EventListener = function(target, type, useCapture, handler, locatio
n, listenerType) |
503 { | 504 { |
504 WebInspector.SDKObject.call(this, target); | 505 WebInspector.SDKObject.call(this, target); |
505 this._type = type; | 506 this._type = type; |
506 this._useCapture = useCapture; | 507 this._useCapture = useCapture; |
507 this._handler = handler; | 508 this._handler = handler; |
508 this._location = location; | 509 this._location = location; |
509 this._sourceURL = location.script().contentURL(); | 510 this._sourceURL = location.script().contentURL(); |
| 511 this._listenerType = listenerType || "normal"; |
510 } | 512 } |
511 | 513 |
512 WebInspector.EventListener.prototype = { | 514 WebInspector.EventListener.prototype = { |
513 /** | 515 /** |
514 * @return {string} | 516 * @return {string} |
515 */ | 517 */ |
516 type: function() | 518 type: function() |
517 { | 519 { |
518 return this._type; | 520 return this._type; |
519 }, | 521 }, |
(...skipping 23 matching lines...) Expand all Loading... |
543 }, | 545 }, |
544 | 546 |
545 /** | 547 /** |
546 * @return {string} | 548 * @return {string} |
547 */ | 549 */ |
548 sourceURL: function() | 550 sourceURL: function() |
549 { | 551 { |
550 return this._sourceURL; | 552 return this._sourceURL; |
551 }, | 553 }, |
552 | 554 |
| 555 /** |
| 556 * @return {string} |
| 557 */ |
| 558 listenerType: function() |
| 559 { |
| 560 return this._listenerType; |
| 561 }, |
| 562 |
| 563 /** |
| 564 * @param {string} listenerType |
| 565 */ |
| 566 setListenerType: function(listenerType) |
| 567 { |
| 568 this._listenerType = listenerType; |
| 569 }, |
| 570 |
553 __proto__: WebInspector.SDKObject.prototype | 571 __proto__: WebInspector.SDKObject.prototype |
554 } | 572 } |
OLD | NEW |