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

Unified Diff: third_party/pkg/angular/lib/core_dom/directive.dart

Issue 1058283006: Update pubspecs and dependencies to get pkgbuild tests working. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
Index: third_party/pkg/angular/lib/core_dom/directive.dart
diff --git a/third_party/pkg/angular/lib/core_dom/directive.dart b/third_party/pkg/angular/lib/core_dom/directive.dart
deleted file mode 100644
index 1a8bfada6bb168cf0c38559180a31bffbbe5fe55..0000000000000000000000000000000000000000
--- a/third_party/pkg/angular/lib/core_dom/directive.dart
+++ /dev/null
@@ -1,72 +0,0 @@
-part of angular.core.dom;
-
-/**
- * Callback function used to notify of attribute changes.
- */
-typedef AttributeChanged(String newValue);
-
-/**
- * NodeAttrs is a facade for element attributes. The facade is responsible
- * for normalizing attribute names as well as allowing access to the
- * value of the directive.
- */
-class NodeAttrs {
- final dom.Element element;
-
- Map<String, List<AttributeChanged>> _observers;
-
- NodeAttrs(this.element);
-
- operator [](String attributeName) =>
- element.attributes[attributeName];
-
- operator []=(String attributeName, String value) {
- if (value == null) {
- element.attributes.remove(attributeName);
- } else {
- element.attributes[attributeName] = value;
- }
- if (_observers != null && _observers.containsKey(attributeName)) {
- _observers[attributeName].forEach((fn) => fn(value));
- }
- }
-
- /**
- * Observe changes to the attribute by invoking the [AttributeChanged]
- * function. On registration the [AttributeChanged] function gets invoked
- * synchronise with the current value.
- */
- observe(String attributeName, AttributeChanged notifyFn) {
- if (_observers == null) {
- _observers = new Map<String, List<AttributeChanged>>();
- }
- if (!_observers.containsKey(attributeName)) {
- _observers[attributeName] = new List<AttributeChanged>();
- }
- _observers[attributeName].add(notifyFn);
- notifyFn(this[attributeName]);
- }
-
- void forEach(void f(String k, String v)) {
- element.attributes.forEach(f);
- }
-
- bool containsKey(String attributeName) =>
- element.attributes.containsKey(attributeName);
-
- Iterable<String> get keys =>
- element.attributes.keys;
-}
-
-/**
- * TemplateLoader is an asynchronous access to ShadowRoot which is
- * loaded asynchronously. It allows a Component to be notified when its
- * ShadowRoot is ready.
- */
-class TemplateLoader {
- final async.Future<dom.ShadowRoot> _template;
-
- async.Future<dom.ShadowRoot> get template => _template;
-
- TemplateLoader(this._template);
-}
« no previous file with comments | « third_party/pkg/angular/lib/core_dom/cookies.dart ('k') | third_party/pkg/angular/lib/core_dom/directive_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698