Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: tools/dom/templates/html/impl/impl_Element.darttemplate

Issue 21182002: Allow "bulk editing" of the CssStyleDeclaration objects in an ElementList as well (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/impl/impl_Element.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_Element.darttemplate b/tools/dom/templates/html/impl/impl_Element.darttemplate
index 29533d85e51edf400246ddabfac96794c71a764f..90176d6a80de2382235ee81e11bed0962a397c22 100644
--- a/tools/dom/templates/html/impl/impl_Element.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Element.darttemplate
@@ -176,6 +176,18 @@ abstract class ElementList<T extends Element> extends ListBase<T> {
/** Replace the classes with `value` for every element in this list. */
set classes(Iterable<String> value);
+ /**
+ * Access the union of all [CssStyleDeclaration]s that are associated with an
+ * [ElementList].
+ *
+ * Grouping the style objects all together provides easy editing of specific
+ * properties of a collection of elements. Setting a specific property value
+ * will set that property in all [Element]s in the [ElementList]. Getting a
+ * specific property value will return the value of the property of the first
+ * element in the [ElementList].
+ */
+ CssStyleDeclarationBase get style;
+
/**
* Access dimensions and position of the Elements in this list.
*
@@ -270,6 +282,9 @@ class _FrozenElementList<T extends Element> extends ListBase<T> implements Eleme
Element get single => _nodeList.single;
CssClassSet get classes => new _MultiElementCssClassSet(_elementList);
+
+ CssStyleDeclarationBase get style =>
+ new _CssStyleDeclarationSet(_elementList);
void set classes(Iterable<String> value) {
_elementList.forEach((e) => e.classes = value);
« no previous file with comments | « tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698