Fix exception when drawAttention is called too early
// FREEBIE
This commit is contained in:
parent
28c82531d3
commit
f0539fda52
1 changed files with 7 additions and 3 deletions
|
@ -135,18 +135,22 @@
|
||||||
console.log('draw attention');
|
console.log('draw attention');
|
||||||
if (chrome.app.window) {
|
if (chrome.app.window) {
|
||||||
var w = chrome.app.window.get(window_id);
|
var w = chrome.app.window.get(window_id);
|
||||||
|
if (w) {
|
||||||
w.clearAttention();
|
w.clearAttention();
|
||||||
w.drawAttention();
|
w.drawAttention();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
clearAttention: function(window_id) {
|
clearAttention: function(window_id) {
|
||||||
console.log('clear attention');
|
console.log('clear attention');
|
||||||
if (chrome.app.window) {
|
if (chrome.app.window) {
|
||||||
var w = chrome.app.window.get(window_id);
|
var w = chrome.app.window.get(window_id);
|
||||||
|
if (w) {
|
||||||
w.clearAttention();
|
w.clearAttention();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue