4 <script type=
"application/javascript">
6 function setDomain(domain) {
7 document.domain = domain;
10 function tryToAccess(otherWin) {
12 var text = otherWin.document.getElementById('foo').innerHTML;
13 return /Better Late/.exec(text);
14 } catch (e) { return false; }
18 function storeReference(otherWin) {
19 gRef = otherWin.document.getElementById('foo');
22 function tryToAccessStored() {
24 return /Better Late/.exec(gRef.innerHTML);
25 } catch (e) { return false; }
28 function invokingFunctionThrowsSecurityException(name) {
32 } catch (e) { return /insecure|denied/.test(e); }
39 <span id=
"foo">Better Late than Never
</span>