OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 stopPropagation: function() | 126 stopPropagation: function() |
127 { | 127 { |
128 this._stoppedPropagation = true; | 128 this._stoppedPropagation = true; |
129 }, | 129 }, |
130 | 130 |
131 preventDefault: function() | 131 preventDefault: function() |
132 { | 132 { |
133 this.defaultPrevented = true; | 133 this.defaultPrevented = true; |
134 }, | 134 }, |
135 | 135 |
136 consume: function() | 136 /** |
| 137 * @param {boolean=} preventDefault |
| 138 */ |
| 139 consume: function(preventDefault) |
137 { | 140 { |
138 this.stopPropagation(); | 141 this.stopPropagation(); |
139 this.preventDefault(); | 142 if (preventDefault) |
| 143 this.preventDefault(); |
140 } | 144 } |
141 } | 145 } |
142 | 146 |
143 WebInspector.notifications = new WebInspector.Object(); | 147 WebInspector.notifications = new WebInspector.Object(); |
OLD | NEW |