<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>WinJS.UI.Fragments.renderCopy</Title>
      <Shortcut>wfr</Shortcut>
      <Description>Render a new WinJS Fragment</Description>
      <Author>Jeremie Corpinot</Author>
      <SnippetTypes>
        <!-- snippet types -->
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
    </Header>
    <Snippet>
      <Declarations>
        <Literal>
          <ID>pageFragment</ID>
          <ToolTip>Page fragment</ToolTip>
          <Default>/fragments/fragment.html</Default>
        </Literal>
        <Literal>
          <ID>selector</ID>
          <ToolTip>DOM Selectorto inject the page fragment</ToolTip>
          <Default>document.querySeletor(".fragment")</Default>
        </Literal>
        <Literal>
          <ID>done</ID>
          <ToolTip>Additional process</ToolTip>
          <Default>// Process</Default>
        </Literal>
      </Declarations>
      <Code Language="javascript">
        <![CDATA[WinJS.UI.Fragments.renderCopy("$pageFragment$", $selector$)
                        .done(function (fragment) {
                            // Additional process
                            $done$
                            completeDispatch(); // call the complete method
                        });$end$
        ]]>
      </Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>