Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.

Commit e645a59

Browse files
talsbnjmnt4n
authored andcommitted
Added support for embedded IE.
It would previously crash when touching `window.external`. Closes #113.
1 parent 1b90928 commit e645a59

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

platform.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -844,8 +844,14 @@
844844
name += ' Mobile';
845845
}
846846
// Detect IE platform preview.
847-
else if (name == 'IE' && useFeatures && context.external === null) {
848-
description.unshift('platform preview');
847+
else if (name == 'IE' && useFeatures) {
848+
try {
849+
if (context.external === null) {
850+
description.unshift('platform preview');
851+
}
852+
} catch(e) {
853+
description.unshift('embedded');
854+
}
849855
}
850856
// Detect BlackBerry OS version.
851857
// http://docs.blackberry.com/en/developers/deliverables/18169/HTTP_headers_sent_by_BB_Browser_1234911_11.jsp

0 commit comments

Comments
 (0)