dojo/html._ContentSetter (version 1.10)

Usage

var foo = new html._ContentSetter(params,node);
dojo/html
Parameter Type Description
params Object
node String | DomNode

Property Summary

  • cleanContentShould the content be treated as a full html document, and the real content stripped of , wrapper before injection
  • contentThe content to be placed in the node.
  • extractContentShould the content be treated as a full html document, and the real content stripped of <html> <body> wrapper before injection
  • idUsually only used internally, and auto-generated with each instance
  • nodeAn node which will be the parent element that we set content into
  • parseContentShould the node by passed to the parser after the new content is set
  • parserScopeFlag passed to parser.
  • startupStart the child widgets after parsing them.

Method Summary

  • _mixin(params)
  • _parse() runs the dojo parser over the node contents, storing any results in this.parseResults and the parse promise in this.parseDeferred Any errors resulting from parsing are passed to _onError for handling
  • empty() cleanly empty out existing content
  • set(cont,params) front-end to the set-content sequence
  • setContent() sets the content on the node
  • tearDown() manually reset the Setter instance if its being re-used for example for another set()

Event Summary

  • _onError(type,err,consoleText) shows user the string that is returned by on[type]Error override/implement on[type]Error and return your own string to customize
  • onBegin() Called after instantiation, but before set(); It allows modification of any of the object properties - including the node and content provided - before the set operation actually takes place This default implementation checks for cleanContent and extractContent flags to optionally pre-process html string content
  • onContentError(err)
  • onEnd() Called after set(), when the new content has been pushed into the node It provides an opportunity for post-processing before handing back the node to the caller This default implementation checks a parseContent flag to optionally run the dojo parser over the new content
  • onExecError(err)

Properties

cleanContent
Defined by: dojo/html

Should the content be treated as a full html document, and the real content stripped of , wrapper before injection

content
Defined by: dojo/html

The content to be placed in the node. Can be an HTML string, a node reference, or a enumerable list of nodes

extractContent
Defined by: dojo/html

Should the content be treated as a full html document, and the real content stripped of <html> <body> wrapper before injection

id
Defined by: dojo/html

Usually only used internally, and auto-generated with each instance

node
Defined by: dojo/html

An node which will be the parent element that we set content into

parseContent
Defined by: dojo/html

Should the node by passed to the parser after the new content is set

parserScope
Defined by: dojo/html

Flag passed to parser. Root for attribute names to search for. If scopeName is dojo, will search for data-dojo-type (or dojoType). For backwards compatibility reasons defaults to dojo._scopeName (which is "dojo" except when multi-version support is used, when it will be something like dojo16, dojo20, etc.)

startup
Defined by: dojo/html

Start the child widgets after parsing them. Only obeyed if parseContent is true.

Methods

_mixin(params)
Defined by dojo/html
Parameter Type Description
params undefined
_parse()
Defined by dojo/html

runs the dojo parser over the node contents, storing any results in this.parseResults and the parse promise in this.parseDeferred Any errors resulting from parsing are passed to _onError for handling

empty()
Defined by dojo/html

cleanly empty out existing content

set(cont,params)
Defined by dojo/html

front-end to the set-content sequence

Parameter Type Description
cont String | DomNode | NodeList
Optional

An html string, node or enumerable list of nodes for insertion into the dom If not provided, the object's content property will be used

params Object
Optional
Returns:undefined
setContent()
Defined by dojo/html

sets the content on the node

tearDown()
Defined by dojo/html

manually reset the Setter instance if its being re-used for example for another set()

tearDown() is not called automatically. In normal use, the Setter instance properties are simply allowed to fall out of scope but the tearDown method can be called to explicitly reset this instance.

Events

_onError(type,err,consoleText)
Defined by: dojo/html

shows user the string that is returned by on[type]Error override/implement on[type]Error and return your own string to customize

Parameter Type Description
type undefined
err undefined
consoleText undefined
onBegin()
Defined by: dojo/html

Called after instantiation, but before set(); It allows modification of any of the object properties - including the node and content provided - before the set operation actually takes place This default implementation checks for cleanContent and extractContent flags to optionally pre-process html string content

Returns:undefined
onContentError(err)
Defined by: dojo/html
Parameter Type Description
err undefined
Returns:string
onEnd()
Defined by: dojo/html

Called after set(), when the new content has been pushed into the node It provides an opportunity for post-processing before handing back the node to the caller This default implementation checks a parseContent flag to optionally run the dojo parser over the new content

Returns:undefined
onExecError(err)
Defined by: dojo/html
Parameter Type Description
err undefined
Returns:string
Error in the documentation? Can’t find what you are looking for? Let us know!