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

Unified Diff: lib/event.dart

Issue 22962005: Merge pull request #581 from kevmoo/polymer (Closed) Base URL: https://github.com/dart-lang/web-ui.git@polymer
Patch Set: Created 7 years, 4 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 | « lib/dwc.dart ('k') | lib/observe.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/event.dart
diff --git a/lib/event.dart b/lib/event.dart
deleted file mode 100644
index e77d176969a15444a28ee58795cbea716025b473..0000000000000000000000000000000000000000
--- a/lib/event.dart
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.event;
-
-import 'dart:html';
-import 'package:custom_element/custom_element.dart';
-
-/**
- * *Warning*: this is an implementation helper and should not be used in your
- * code. This method will be replaced in favor of calling to the handler
- * via mirrors.
- *
- * Register an event handler.
- */
-void registerEventHandler(String query, void registerEvent(Node node)) {
- if (_eventHandlers == null) {
- _eventHandlers = {};
- CustomElement.templateCreated.add(_hookEvents);
- }
- if (_eventHandlers.containsKey(query)) {
- throw new ArgumentError('duplicate event handler selector $query');
- }
- _eventHandlers[query] = registerEvent;
-}
-
-void _hookEvents(DocumentFragment fragment) {
- _eventHandlers.forEach((query, hookEvent) {
- for (var node in fragment.queryAll(query)) {
- hookEvent(node);
- }
- });
-}
-
-Map<String, Function> _eventHandlers;
« no previous file with comments | « lib/dwc.dart ('k') | lib/observe.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698