Created
October 1, 2013 17:24
-
-
Save eob/6782034 to your computer and use it in GitHub Desktop.
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 name="description" content="CTS Example: Loading HTML" /> | |
<title>CTS Example: Loading HTML</title> | |
<script src="http://treesheets.org/cts.js"></script> | |
<style type="text/cts"> | |
@html theme http://treesheets.csail.mit.edu/mockups/blog/twenty-thirteen/index.html; | |
@html foo alias(theme); | |
</style> | |
</head> | |
<body style="padding: 20px"> | |
Here is the contents of the <code>theme</code> tree loaded by CTS: | |
<br /> | |
<textarea rows=30 cols=80> | |
</textarea> | |
<script> | |
// Note: as a CTS user you will never have to delve into the guts of the | |
// engine like this. This is just an example to show you that the HTML | |
// tree referenced in the Treesheet above is actually being loaded and | |
// incorporated into the "Forrest" of trees that CTS maintains. | |
CTS.ready.then(function() { | |
CTS.engine._booted.promise.then(function() { | |
CTS.$('textarea').html(CTS.engine.forrest.trees.foo.root.value.html()); | |
}); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment