-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
release 0.0.4, window.location and document.location simulation
- Loading branch information
sashafir
committed
Mar 2, 2018
1 parent
1df4b17
commit 4248bd9
Showing
8 changed files
with
104 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.win-location, | ||
.doc-location{width: 100%;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
let cb = document.getElementById("external"); | ||
cb.checked=true; | ||
document.getElementById("external").checked=true; | ||
[...document.getElementsByTagName('button')].forEach( b => b.onclick = ()=>ToggleCb(b) ); | ||
|
||
function ToggleCb( b ) | ||
{ let a = document.getElementsByClassName( b.getAttribute('for') ); | ||
for( let x of a ) | ||
x.checked = !x.checked; | ||
} | ||
} | ||
const $ = css => document.querySelector(css) | ||
, winLocation = $('.win-location') | ||
, docLocation = $('.doc-location'); | ||
|
||
|
||
winLocation.value = window.location; | ||
docLocation.value = document.location; | ||
document.querySelector('.win-location~*[value=get]').onclick = x => winLocation.value = window.location; | ||
document.querySelector('.doc-location~*[value=get]').onclick = x => docLocation.value = document.location; | ||
document.querySelector('.win-location~*[value=set]').onclick = x => window.location = winLocation.value ; | ||
document.querySelector('.doc-location~*[value=set]').onclick = x => document.location = docLocation.value ; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# EPA browser and application security improvement overview | ||
|
||
Current standards stack provides a little for 3rd party UI integration into web page. | ||
In order to allocate some space in page for 3rd party app content host page either | ||
* should suffer from IFRAME limitations or | ||
* compromise own security by injecting 3rd party JS into page. | ||
|
||
\<embed-page\> has given a flexibility of embedded DOM and IFRAME kind of browsing | ||
context insulation. | ||
|
||
Unlike direct injection of 3rd party script EPA executes JS in host page with | ||
insulation layer preventing access to document, window and major APIs. | ||
|
||
\<embed-page\> at this stage yet a proof of concept for | ||
[Embeddable Progressive Application](https://github.com/EPA-WG/EPA-concept) and potentially | ||
the polyfill for standard-to-be implemented natively by browser with all security concerns addressed. | ||
|
||
|
||
|