(doNotReassessFlashSupport)
| 1711 | * @private |
| 1712 | */ |
| 1713 | var _detectSandbox = function(doNotReassessFlashSupport) { |
| 1714 | var effectiveScriptOrigin, frame, frameError, previousState = _flashState.sandboxed, isSandboxed = null; |
| 1715 | doNotReassessFlashSupport = doNotReassessFlashSupport === true; |
| 1716 | if (_pageIsFramed === false) { |
| 1717 | isSandboxed = false; |
| 1718 | } else { |
| 1719 | try { |
| 1720 | frame = window.frameElement || null; |
| 1721 | } catch (e) { |
| 1722 | frameError = { |
| 1723 | name: e.name, |
| 1724 | message: e.message |
| 1725 | }; |
| 1726 | } |
| 1727 | if (frame && frame.nodeType === 1 && frame.nodeName === "IFRAME") { |
| 1728 | try { |
| 1729 | isSandboxed = frame.hasAttribute("sandbox"); |
| 1730 | } catch (e) { |
| 1731 | isSandboxed = null; |
| 1732 | } |
| 1733 | } else { |
| 1734 | try { |
| 1735 | effectiveScriptOrigin = document.domain || null; |
| 1736 | } catch (e) { |
| 1737 | effectiveScriptOrigin = null; |
| 1738 | } |
| 1739 | if (effectiveScriptOrigin === null || frameError && frameError.name === "SecurityError" && /(^|[\s\(\[@])sandbox(es|ed|ing|[\s\.,!\)\]@]|$)/.test(frameError.message.toLowerCase())) { |
| 1740 | isSandboxed = true; |
| 1741 | } |
| 1742 | } |
| 1743 | } |
| 1744 | _flashState.sandboxed = isSandboxed; |
| 1745 | if (previousState !== isSandboxed && !doNotReassessFlashSupport) { |
| 1746 | _detectFlashSupport(_ActiveXObject); |
| 1747 | } |
| 1748 | return isSandboxed; |
| 1749 | }; |
| 1750 | /** |
| 1751 | * Detect the Flash Player status, version, and plugin type. |
| 1752 | * |
no test coverage detected