Last active
September 7, 2018 20:31
-
-
Save matthewp/6afe8de556e7a0db0ae8ea25db2e0930 to your computer and use it in GitHub Desktop.
Page test
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
<!doctype html> | |
<html lang="en"> | |
<title>Page 1</title> | |
<main id="main"></main> | |
<h1>Links</h1> | |
<ul> | |
<li><a href="/about">About</a></li> | |
<li><a href="/page2.html">Page 2</a></li> | |
</ul> | |
<script src="//unpkg.com/page/page.js"></script> | |
<script> | |
page("/page1.html", function() { | |
main.textContent = "Page 1"; | |
}); | |
page("/about", function() { | |
main.textContent = "About page" | |
}); | |
page(); | |
</script> |
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
<!doctype html> | |
<html lang="en"> | |
<title>Page 2</title> | |
<main id="main"></main> | |
<h1>Links</h1> | |
<ul> | |
<li><a href="/about">About</a></li> | |
<li><a href="/page1.html">Page 1</a></li> | |
</ul> | |
<script src="//unpkg.com/page/page.js"></script> | |
<script> | |
page("/page2.html", function() { | |
main.textContent = "Page 2"; | |
}); | |
page("/about", function() { | |
main.textContent = "About page" | |
}); | |
page(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment