dojox/dtl/contrib/dom (version 1.10)

Method Summary

Methods

buffer(parser,token)

Buffer large DOM manipulations during re-render.

When using DomTemplate, wrap any content that you expect to change often during re-rendering. It will then remove its parent from the main document while it re-renders that section of code. It will only remove it from the main document if a mainpulation of somes sort happens. ie It won't swap out if it diesn't have to.

Parameter Type Description
parser undefined
token undefined
Returns:instance

Examples

Example 1

By default, it considers only node addition/removal to be "changing"

{% buffer %}{% for item in items %}<li>{{ item }}</li>{% endfor %}{% endbuffer %}

Example 2

You can explicitly declare options:

  • node: Watch node removal/addition
  • class: Watch for a classname to be changed
  • text: Watch for any text to be changed
{% buffer node class %}{% for item in items %}<li>{{ item }}</li>{% endfor %}{% endbuffer %}
BufferNode(nodelist,options)
Parameter Type Description
nodelist undefined
options undefined
html(parser,token)
Parameter Type Description
parser undefined
token undefined
Returns:undefined
style_(parser,token)
Parameter Type Description
parser undefined
token undefined
Returns:instance
StyleNode(styles)
Parameter Type Description
styles undefined
Error in the documentation? Can’t find what you are looking for? Let us know!