-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add eventlistener to body after DOM is loaded (#38)
- Loading branch information
1 parent
1d59657
commit bd85584
Showing
7 changed files
with
117 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<!DOCTYPE html> | ||
<html lang="en-us"> | ||
<head> | ||
<title>Embedded Content Consuming Site</title> | ||
<meta charset="utf-8" /> | ||
<script src="http://localhost:8080/xfc.js"></script> | ||
<style> | ||
iframe { | ||
width: 100%; | ||
border: none; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
html[hidden] { display: none; } | ||
.xfc[data-status='mounted'] { | ||
border: 5px dashed #000; | ||
} | ||
.xfc[data-status='launched'] { | ||
border: 5px dashed #00F; | ||
} | ||
.xfc[data-status='authorized'] { | ||
border: 5px dashed #0F0; | ||
} | ||
.grid { | ||
display: flex; | ||
flex-flow: row wrap; | ||
} | ||
.grid div { | ||
padding: 20px; | ||
} | ||
#c1 { | ||
border: 5px dashed #000; | ||
} | ||
#c2 { | ||
border: 5px dashed #00F; | ||
} | ||
#c3 { | ||
border: 5px dashed #0F0; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div> | ||
<h2>The following are XFC's statuses (mounted, launched, authorized).</h2> | ||
</div> | ||
<div class="grid"> | ||
<div id="c1"> | ||
<h2>mounted app</h2> | ||
</div> | ||
<p></p> | ||
<div id="c2"> | ||
<h2>launched app</h2> | ||
</div> | ||
<p></p> | ||
<div id="c3"> | ||
<h2>authorized app</h2> | ||
</div> | ||
</div> | ||
<p>This example shows that the image resizing event is called only after the DOM is loaded</p> | ||
<script> | ||
XFC.Consumer.init() | ||
XFC.Consumer.mount(document.body, 'http://localprovider.com:8080/example/initialization/1_d_provider.html'); | ||
</script> | ||
</body> | ||
</html> |
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,23 @@ | ||
<!DOCTYPE html> | ||
<html lang="en-us"> | ||
<head> | ||
<title>HealtheLife Trusted Site</title> | ||
<meta charset="utf-8" /> | ||
<style> | ||
body { | ||
padding-bottom: 5px; | ||
} | ||
html[hidden] { display: none; } | ||
</style> | ||
<script src="http://localhost:8080/xfc.js"></script> | ||
<script type="text/javascript"> | ||
XFC.Provider.init({ acls: ['*'] }) | ||
</script> | ||
</head> | ||
<body> | ||
<div> | ||
<h1>1. Initialization</h1> | ||
<p>The image resizing event(imageRequestResize) is called only after the DOM is loaded.</p> | ||
</div> | ||
</body> | ||
</html> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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