feature(ShadowDomTransformer): create a compiler step to transform the shadow DOM

This commit is contained in:
Victor Berchet
2015-02-05 15:07:06 +01:00
parent 7bf5ab8f43
commit 47042bc503
15 changed files with 317 additions and 165 deletions
+6
View File
@@ -103,6 +103,12 @@ class DOM {
el.setAttribute(attrName, attrValue);
return el;
}
static StyleElement createStyleElement(String css, [HtmlDocument doc = null]) {
if (doc == null) doc = document;
var el = doc.createElement("STYLE");
el.text = css;
return el;
}
static clone(Node node) => node.clone(true);
static bool hasProperty(Element element, String name) =>
new JsObject.fromBrowserObject(element).hasProperty(name);