use of org.w3c.dom.css.DocumentCSS in project webtools.sourceediting by eclipse.
the class GetOverrideStyleTest method testModel.
public void testModel() {
IDOMModel model = FileUtil.createHTMLModel();
try {
model.getStructuredDocument().setText(null, "<style>p { border-color: blue; margin: 0; } </style> <p style=\"border-color: red; margin: 1;\">");
Document document = model.getDocument();
DocumentCSS ddd = (DocumentCSS) document;
NodeList n = document.getElementsByTagName("p");
ddd.getOverrideStyle((Element) n.item(0), "");
} finally {
if (model != null) {
model.releaseFromEdit();
}
}
}
Aggregations