Error When Convert Polymer App to Chrome App

40 views
Skip to first unread message

weipin...@gmail.com

unread,
Jun 28, 2015, 6:17:11 PM6/28/15
to polym...@googlegroups.com
I refreshed an app to catch up Polymer 1.0, it was a success. Then I tried to convert it to Chrome app so we don't need to run a web server, but I saw the following error when I ran the Chrome app:

(Chrome: 43.0.2357.130 m bower.json attached)

Uncaught TypeError: Cannot set property focused of #<paper-checkbox> which has only a getter
Polymer.IronControlState._disabledChanged @ build.js:72876
Polymer.Base.extend._observerEffect @ build.js:69290
(anonymous function) @ build.js:69147
Polymer.Bind._modelApi._effectEffects @ build.js:69144
Polymer.Bind._modelApi._propertySetter @ build.js:69129
Polymer.Bind._modelApi.__setProperty @ build.js:69138
Polymer.Base._addFeature._applyConfig @ build.js:69631
Polymer.Base._addFeature._afterClientsReady @ build.js:69625
Polymer.Base._addFeature._ready @ build.js:66689
Polymer.Base._addFeature._readyClients @ build.js:66696
Polymer.Base._addFeature._ready @ build.js:66688
Polymer.Base._addFeature._readyClients @ build.js:66696
Polymer.Base._addFeature._ready @ build.js:66688
Polymer.Base._addFeature._tryReady @ build.js:66679
Polymer.Base._addFeature._initFeatures @ build.js:70965
Polymer.Base.createdCallback @ build.js:66215
window.Polymer @ build.js:66167
(anonymous function) @ build.js:74787

Here is code
  Polymer.IronControlState = {
    properties: {
      focused: {
        type: Boolean,
        value: false,
        notify: true,
        readOnly: true,                           <---------------------------- it is defined as readonly
        reflectToAttribute: true
      },

    _disabledChanged: function(disabled, old) {
      this.setAttribute('aria-disabled', disabled ? 'true' : 'false');
      this.style.pointerEvents = disabled ? 'none' : '';
      if (disabled) {
        this._oldTabIndex = this.tabIndex;
        this.focused = false;                        <-------------------------- Complaining this line
        this.tabIndex = -1;
      } else if (this._oldTabIndex !== undefined) {
        this.tabIndex = this._oldTabIndex;
      }
    },


bower.json
Reply all
Reply to author
Forward
0 new messages