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

Unified Diff: lib/components/accordion.dart

Issue 14295009: Fix widget.dart to work with the latest web_ui library. Specifically, query selectors need to use "… (Closed) Base URL: https://github.com/kevmoo/widget.dart.git@master
Patch Set: ptal Created 7 years, 8 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 | « changelog.md ('k') | lib/components/accordion.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/components/accordion.dart
diff --git a/lib/components/accordion.dart b/lib/components/accordion.dart
index d82192aa41f4e2439635e06e7f200c59db9d89fc..049ee68f64941049031f6e2419bb9244cb0762fd 100644
--- a/lib/components/accordion.dart
+++ b/lib/components/accordion.dart
@@ -26,20 +26,18 @@ class Accordion extends WebComponent {
});
}
- List<Element> _getAllCollapseElements() => this.queryAll('x-accordion > x-collapse');
+ List<Element> _getAllCollapseElements() =>
+ this.queryAll('[is=x-accordion] > [is=x-collapse]');
void _onOpen(Event openEvent) {
- if(openEvent.target is UnknownElement) {
- final UnknownElement target = openEvent.target;
- final ShowHideComponent shc = target.xtag as ShowHideComponent;
- if(shc != null) {
- _onShowHideToggle(shc);
- }
+ Element target = openEvent.target;
+ if (target.xtag is ShowHideComponent) {
+ _onShowHideToggle(target.xtag);
}
}
void _onShowHideToggle(ShowHideComponent shc) {
- if(shc.isShown) {
+ if (shc.isShown) {
_getAllCollapseElements()
.map((Element e) => e.xtag)
.where((e) => e != shc)
« no previous file with comments | « changelog.md ('k') | lib/components/accordion.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698