-
Notifications
You must be signed in to change notification settings - Fork 0
3. Produce
Suppenhuhn79 edited this page May 12, 2021
·
4 revisions
Imported page snippets become members of the pageSnippet
-object and provide the produce()
-method for generating the corresponding element.
htmlElement = pageSnippets.<snippet>.produce(owner, variables, namespaceURI)
-
owner <object>
object that provides all methods for event handlers, function calls and post-production.
Optional, default:window
. -
variables <object>
JSON containing all variables used.
Optional, default:{}
. -
namespaceURI <string>
if you want to produce anything other than HTML. For HTML to include in the current document this must benull
.
Optional, default:null
.
Returns a HTMLElement
that has been generated from the snippet template.
Monitor your console on any production issues.
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">