See the dojox/html/_base reference documentation for more information.
adjusts relative paths in cssText to be relative to cssUrl a path is considered relative if it doesn't start with '/' and not contains ':'
Say we fetch a HTML page from level1/page.html It has some inline CSS:
@import "css/page.css" tv, screen; ... background-image: url(images/aplhaimage.png);
as we fetched this HTML and therefore this CSS from level1/page.html, these paths needs to be adjusted to:
@import 'level1/css/page.css' tv, screen; ... background-image: url(level1/images/alphaimage.png);
In IE it will also adjust relative paths in AlphaImageLoader()
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/alphaimage.png');
will be adjusted to:
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='level1/images/alphaimage.png');
Please note that any relative paths in AlphaImageLoader in external css files wont work, as the paths in AlphaImageLoader is MUST be declared relative to the HTML page, not relative to the CSS file that declares it
Parameter | Type | Description |
---|---|---|
cssUrl | undefined | |
cssText | undefined |
Parameter | Type | Description |
---|---|---|
htmlUrl | undefined | |
cont | undefined |
strips out script tags from cont
Parameter | Type | Description |
---|---|---|
cont | undefined | |
byRef | undefined | byRef = {errBack:function(){/add your download error code here/, downloadRemote: true(default false)}} byRef will have {code: 'jscode'} when this scope leaves |
Parameter | Type | Description |
---|---|---|
cssUrl | String | |
cont | String | |
styles | Array |
Parameter | Type | Description |
---|---|---|
code | undefined | |
appendNode | undefined |
inserts (replaces) the given content into the given node
Parameter | Type | Description |
---|---|---|
node | DomNode | the parent element that will receive the content |
cont | String | DomNode | NodeList | the content to be set on the parent element. This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes |
params | Object |
Optional Optional flags/properties to configure the content-setting. See dojo.html._ContentSetter |
A safe string/node/nodelist content replacement/injection with hooks for extension Example Usage:
dojo.html.set(node, "some string"); dojo.html.set(node, contentNode, {options}); dojo.html.set(node, myNode.childNodes, {options});