Last active
December 28, 2015 20:59
-
-
Save xquery/7561028 to your computer and use it in GitHub Desktop.
my first frameless example - would like to be able to set default source (like saxon-ce data-source on <script/> element
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> | |
<head> | |
<meta charset="utf-8"> | |
<title>Frameless Example</title> | |
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> | |
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script> | |
</head> | |
<body> | |
<div> | |
<h1>inline templates - create button for each h1 element</h1> | |
<for-each select="//h1" sort group-by="."> | |
<button>{{.}}</button> | |
</for-each> | |
</div> | |
<div> | |
<h1>inline templates</h1> | |
<span data-text="{$message}">?</span> | |
</div> | |
<div> | |
<h1>Binding</h1> | |
<p> | |
<input data-ref="$message"/> | |
<input data-ref="$message"/> | |
<span data-text="{string-length($message)} characters">?</span> | |
</p> | |
</div> | |
<div> | |
<h1>data ref with input form</h1> | |
<input name="examplefield" data-ref="$example"></input> | |
</div> | |
<script src="frameless.js"></script> | |
<script> | |
$(document).ready(function() { | |
var doc = Frameless.parseXML("<html xmlns='http:///www.w3.org/1999/xhtml'><body>Hello world</body></html>"); | |
Frameless.variable('example', 1); | |
Frameless.variable('message', document.createTextNode('Cheers! 🍻')) | |
Frameless.autodiscover(); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment