dojo/dom-style
Manipula estilos css en nodos
getComputedStyle()
. Devuelve un objeto con las propiedades de un nodo.
require(["dojo/dom-style", "dojo/dom"], function(domStyle, dom){
var node = dom.byId("myNode");
var computedStyle = domStyle.getComputedStyle(node);
});
get()
. Devuelve una propiedad en concreto de una clase que posee un nodo.
require(["dojo/dom-style"], function(domStyle){
var width = domStyle.get("someNode", "width");
});
set()
. Establece propiedades de estilo a una clase.
require(["dojo/dom-style"], function(domStyle){
domStyle.set("someNode", {
width: "100px",
backgroundColor: "blue"
});
});