зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1246842 - Rework previous commit to not used deprecated arguments.callee r=cpearce
MozReview-Commit-ID: DFWNOGN0FyY --HG-- extra : transplant_source : %1E%0D%0E%F7%EB%AE%10%40%D6%C2%3F%03%EC%16%98%91Z%60%D8%20
This commit is contained in:
Родитель
ec7d44ede3
Коммит
61408b539f
|
@ -53,8 +53,8 @@ function range(start, end) {
|
|||
|
||||
function once(target, name, cb) {
|
||||
var p = new Promise(function(resolve, reject) {
|
||||
target.addEventListener(name, function() {
|
||||
target.removeEventListener(name, arguments.callee);
|
||||
target.addEventListener(name, function onceEvent() {
|
||||
target.removeEventListener(name, onceEvent);
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1357,8 +1357,8 @@ function removeNodeAndSource(n) {
|
|||
|
||||
function once(target, name, cb) {
|
||||
var p = new Promise(function(resolve, reject) {
|
||||
target.addEventListener(name, function() {
|
||||
target.removeEventListener(name, arguments.callee);
|
||||
target.addEventListener(name, function onceEvent() {
|
||||
target.removeEventListener(name, onceEvent);
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче