-
Notifications
You must be signed in to change notification settings - Fork 0
3. Produce
Suppenhuhn79 edited this page May 26, 2021
·
4 revisions
Imported page snippets become members of the pageSnippet
-object and provide the produce()
-method for generating the corresponding element.
element = pageSnippets.<snippet>.produce(owner, data, _parentSnippetKey)
-
owner <object>
object that provides all methods for event handlers, function calls and post-production. Optional, default=window
. -
data <object>
JSON containing all placeholders used. Optional, default={}
. -
_parentSnippetKey <string>
For internal use only. Snippet key of parent snippet if produced via include-snippet.
Returns an Element
subtype of the specific type that has been generated from the snippet template. Usually this will be a subtype of HTMLElement.
Monitor your console on any production issues.
If your desired output is anything other than HTML, just declare its namespace in the <ps:pagesnippets>
root element. See Define: Namespaces.
The prefix ps:
used in XML code is the recommended tag prefix for elements of the pageSnippet-namespace:
<ps:pagesnippets xmlns:ps="https://github.com/suppenhuhn79/pagesnippets">