Skip to content

Commit 5052ef1

Browse files
committed
Review - remove func
1 parent 0688465 commit 5052ef1

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

CCBoot.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2747,15 +2747,13 @@ cc.game = /** @lends cc.game# */{
27472747

27482748
if (hidden) {
27492749
for (var i=0; i<changeList.length; i++) {
2750-
(function (visibilityChange){
2751-
document.addEventListener(visibilityChange, function (event) {
2752-
var visible = document[hidden];
2753-
// QQ App
2754-
visible = visible || event["hidden"];
2755-
if (visible) onHidden();
2756-
else onShow();
2757-
}, false);
2758-
})(changeList[i]);
2750+
document.addEventListener(changeList[i], function (event) {
2751+
var visible = document[hidden];
2752+
// QQ App
2753+
visible = visible || event["hidden"];
2754+
if (visible) onHidden();
2755+
else onShow();
2756+
}, false);
27592757
}
27602758
} else {
27612759
win.addEventListener("blur", onHidden, false);

0 commit comments

Comments
 (0)