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

Unified Diff: third_party/polymer/v0_8/components-chromium/polymer/src/standard/events-extracted.js

Issue 1162563004: Upgrade to 1.0 and switch clients to dom-repeat where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a layout import and remove the gzipped webanimation in reproduce.sh Created 5 years, 7 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/polymer/v0_8/components-chromium/polymer/src/standard/events-extracted.js
diff --git a/third_party/polymer/v0_8/components-chromium/polymer/src/standard/events-extracted.js b/third_party/polymer/v0_8/components-chromium/polymer/src/standard/events-extracted.js
deleted file mode 100644
index 4f6a3e795cb77fe3d21fd945569c5e16d3f48f10..0000000000000000000000000000000000000000
--- a/third_party/polymer/v0_8/components-chromium/polymer/src/standard/events-extracted.js
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
- /**
- * Supports `listeners` and `keyPresses` objects.
- *
- * Example:
- *
- * using('Base', function(Base) {
- *
- * Polymer({
- *
- * listeners: {
- * // `click` events on the host are delegated to `clickHandler`
- * 'click': 'clickHandler'
- * },
- *
- * keyPresses: {
- * // 'ESC' key presses are delegated to `escHandler`
- * Base.ESC_KEY: 'escHandler'
- * },
- *
- * ...
- *
- * });
- *
- * });
- *
- * @class standard feature: events
- *
- */
-
- Polymer.Base._addFeature({
-
- listeners: {},
-
- _listenListeners: function(listeners) {
- var node, name, key;
- for (key in listeners) {
- if (key.indexOf('.') < 0) {
- node = this;
- name = key;
- } else {
- name = key.split('.');
- node = this.$[name[0]];
- name = name[1];
- }
- this.listen(node, name, listeners[key]);
- }
- },
-
- listen: function(node, eventName, methodName) {
- var host = this;
- var handler = function(e) {
- if (host[methodName]) {
- host[methodName](e, e.detail);
- } else {
- console.warn('[%s].[%s]: event handler [%s] is null in scope (%o)',
- node.localName, eventName, methodName, host);
- }
- };
- switch (eventName) {
- case 'tap':
- case 'track':
- Polymer.Gestures.add(eventName, node, handler);
- break;
-
- default:
- node.addEventListener(eventName, handler);
- break;
- }
- },
-
- keyCodes: {
- ESC_KEY: 27,
- ENTER_KEY: 13,
- LEFT: 37,
- UP: 38,
- RIGHT: 39,
- DOWN: 40,
- SPACE: 32
- }
-
- });
-

Powered by Google App Engine
This is Rietveld 408576698