Skip to content

Commit 7afae0d

Browse files
author
Alexander Obuhovich
committed
Rename "addEvent" to "addEventListener"
1 parent 3d9b69f commit 7afae0d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@
281281
}
282282
283283
// attach listener for expanding/collapsing the target
284-
Sfjs.addEvent(buttons[i], 'click', function (e) {
284+
Sfjs.addEventListener(buttons[i], 'click', function (e) {
285285
toggle(this);
286286
287287
e.preventDefault();
@@ -380,7 +380,7 @@
380380
throw "Tab target " + targetId + " does not exist";
381381
}
382382
383-
tabs[i].addEventListener('click', function (e) {
383+
Sfjs.addEventListener(tabs[i], 'click', function (e) {
384384
select(this);
385385
386386
e.preventDefault();

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
localStorage.setItem(profilerStorageKey + name, value);
6868
},
6969
70-
addEvent = function (element, eventName, callback) {
70+
addEventListener = function (element, eventName, callback) {
7171
if (document.all) {
7272
element.attachEvent('on' + eventName, callback);
7373
} else {
@@ -197,7 +197,7 @@
197197
198198
requestStack.push(stackElement);
199199
200-
addEvent(this, 'readystatechange', function() {
200+
addEventListener(this, 'readystatechange', function() {
201201
if (self.readyState == 4) {
202202
stackElement.duration = new Date() - stackElement.start;
203203
stackElement.loading = false;
@@ -227,7 +227,7 @@
227227
228228
setPreference: setPreference,
229229
230-
addEvent: addEvent,
230+
addEventListener: addEventListener,
231231
232232
request: request,
233233

0 commit comments

Comments
 (0)