Modify window.focus canary

I suspect whatever is doing the modification is swallowing
exceptions.
This commit is contained in:
John Firebaugh
2013-04-23 13:45:10 -07:00
parent 781f540b3c
commit 19e21e1d26
2 changed files with 5 additions and 15 deletions
+5 -1
View File
@@ -48,7 +48,11 @@
},
set: function() {
throw new Error("tried to overwrite window.focus");
try {
throw new Error("tried to overwrite window.focus");
} catch(e) {
Raven.captureException(e);
}
}
});
}
-14
View File
@@ -195,20 +195,6 @@
<body>
<div id='id-container'></div>
<script>
// Adding a canary for https://app.getsentry.com/id/id/group/5138888/
if (Object.defineProperty) {
var windowFocus = window.focus;
Object.defineProperty(window, 'focus', {
get: function() {
return windowFocus;
},
set: function() {
throw new Error("tried to overwrite window.focus");
}
});
}
iD.data.load(function() {
id = iD().assetPath('dist/');