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

Side by Side Diff: third_party/polymer/v1_0/components-chromium/more-routing/driver/path-extracted.js

Issue 1162963002: Revert "Rename polymer and cr_elements v0_8 to v1_0" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 unified diff | Download patch
OLDNEW
(Empty)
1
2 (function(scope) {
3 var MoreRouting = scope.MoreRouting = scope.MoreRouting || {};
4 MoreRouting.PathDriver = PathDriver;
5
6 /**
7 * TODO(nevir): Docs.
8 */
9 function PathDriver() {
10 MoreRouting.Driver.apply(this, arguments);
11 this._bindEvents();
12 this._read();
13 }
14 PathDriver.prototype = Object.create(MoreRouting.Driver.prototype);
15
16 PathDriver.prototype.navigateToUrl = function navigateToUrl(url) {
17 window.history.pushState({}, '', url);
18 this._read();
19 };
20
21 PathDriver.prototype._bindEvents = function _bindEvents() {
22 window.addEventListener('popstate', this._read.bind(this));
23 };
24
25 PathDriver.prototype._read = function _read() {
26 this.setCurrentPath(window.location.pathname);
27 };
28
29 })(window);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698