You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Returns the id of the element, or an empty string if it is not present
63
+
/// Returns the id of the element, or an empty string if it is not present or
64
+
/// this Node is not an html Element.
63
65
Stringget id {
64
66
if (node is html.Element) {
65
67
return (node as html.Element).id;
@@ -68,8 +70,8 @@ class ExtensionContext {
68
70
return'';
69
71
}
70
72
71
-
/// Returns a set of classes on the element, or an empty set if none are
72
-
/// present.
73
+
/// Returns a set of classes on this Element, or an empty set if none are
74
+
/// present or this Node is not an html Element.
73
75
Set<String> get classes {
74
76
if (node is html.Element) {
75
77
return (node as html.Element).classes;
@@ -83,38 +85,58 @@ class ExtensionContext {
83
85
finalHtmlParser parser;
84
86
85
87
/// A reference to the [StyledElement] representation of this node.
86
-
/// Guaranteed to be non-null only after the lexing step
88
+
/// Guaranteed to be non-null only after the preparing step
87
89
finalStyledElement? styledElement;
88
90
89
-
/// Guaranteed only when in the `parse` method of an Extension, but it might not necessarily be the nearest BuildContext. Probably should use a `Builder` Widget if you absolutely need the most relevant BuildContext.
91
+
/// A reference to the [Style] on the [StyledElement] representation of this
92
+
/// node. Guaranteed to be non-null only after the preparing step.
93
+
Style?get style {
94
+
return styledElement?.style;
95
+
}
96
+
97
+
/// The [StyledElement] version of this node's children. Guaranteed to be
0 commit comments