| Index: pkg/template_binding/lib/js/observe.js
|
| diff --git a/pkg/template_binding/lib/js/observe.js b/pkg/template_binding/lib/js/observe.js
|
| index 240e25deb472db7fd04232856fe9c4c4db74b0e8..147f68a6ce902104507d0e0894ae4c324f348626 100644
|
| --- a/pkg/template_binding/lib/js/observe.js
|
| +++ b/pkg/template_binding/lib/js/observe.js
|
| @@ -1,16 +1,11 @@
|
| -// Copyright 2012 Google Inc.
|
| -//
|
| -// Licensed under the Apache License, Version 2.0 (the "License");
|
| -// you may not use this file except in compliance with the License.
|
| -// You may obtain a copy of the License at
|
| -//
|
| -// http://www.apache.org/licenses/LICENSE-2.0
|
| -//
|
| -// Unless required by applicable law or agreed to in writing, software
|
| -// distributed under the License is distributed on an "AS IS" BASIS,
|
| -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| -// See the License for the specific language governing permissions and
|
| -// limitations under the License.
|
| +/*
|
| + * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
| + * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
| + * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
| + * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
| + * Code distributed by Google as part of the polymer project is also
|
| + * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
| + */
|
|
|
| (function(global) {
|
| 'use strict';
|
| @@ -70,7 +65,7 @@
|
| // Firefox OS Apps do not allow eval. This feature detection is very hacky
|
| // but even if some other platform adds support for this function this code
|
| // will continue to work.
|
| - if (navigator.getDeviceStorage) {
|
| + if (typeof navigator != 'undefined' && navigator.getDeviceStorage) {
|
| return false;
|
| }
|
|
|
| @@ -85,7 +80,7 @@
|
| var hasEval = detectEval();
|
|
|
| function isIndex(s) {
|
| - return +s === s >>> 0;
|
| + return +s === s >>> 0 && s !== '';
|
| }
|
|
|
| function toNumber(s) {
|
| @@ -799,26 +794,12 @@
|
|
|
| var runningMicrotaskCheckpoint = false;
|
|
|
| - var hasDebugForceFullDelivery = hasObserve && hasEval && (function() {
|
| - try {
|
| - eval('%RunMicrotasks()');
|
| - return true;
|
| - } catch (ex) {
|
| - return false;
|
| - }
|
| - })();
|
| -
|
| global.Platform = global.Platform || {};
|
|
|
| global.Platform.performMicrotaskCheckpoint = function() {
|
| if (runningMicrotaskCheckpoint)
|
| return;
|
|
|
| - if (hasDebugForceFullDelivery) {
|
| - eval('%RunMicrotasks()');
|
| - return;
|
| - }
|
| -
|
| if (!collectObservers)
|
| return;
|
|
|
|
|