Snowman 1.3: window.passage
Like other functionality in Harlowe and SugarCube story formats, information about the current passage can be accessed through the <em>window.passage</em> global object in Snowman.
[[Properties]]Different properties of the <em>window.passage</em> object can be accessed through <em>id</em>, the identification number of the current passage, <em>name</em>, the name of the current passage, and <em>source</em>, the content of the current passage.
<div id="log"></div>
<script>
var propertyList = "ID of passage: " + window.passage.id + "<br>";
propertyList += "Name of passage: " + window.passage.name + "<br>";
$("#log").html(propertyList);
</script>
[[Functions]]Echoing functionality found in <em>window.story</em>, <em>window.passage</em> also has the function <em>render()</em>, which parses the markdown (if any) in the current passage and returns the HTML result.
<div id="log"></div>
<script>
var renderedPassage = window.story.passage("Example Passage").render();
$("#log").html(renderedPassage);
</script>[
This text will be green.
]{#renderExample}