Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.8] readOnly property without notify will not be readOnly #1294

Closed
cdata opened this issue Mar 14, 2015 · 2 comments
Closed

[0.8] readOnly property without notify will not be readOnly #1294

cdata opened this issue Mar 14, 2015 · 2 comments
Assignees
Labels

Comments

@cdata
Copy link
Contributor

cdata commented Mar 14, 2015

If a property foo is readOnly but does not notify, a _setFoo setter is not created, and the foo property will be directly settable.

Relatedly, considering the following contrived element:

<link rel="import" href="../polymer/polymer.html">
<script>
  Polymer({
    is: 'test-el',

    properties: {
      foo: {
        readOnly: true,
        value: function() {
          console.log('The foo setter is:', typeof this._setFoo);
        }
      },

      bar: {
        readOnly: true,
        notify: true,
        value: function() {
          console.log('The bar setter is:', typeof this._setBar);
        }
      }
    }
  })
</script>

The console output is:

The foo setter is: undefined
The bar setter is: function
@cdata cdata added the 0.8 label Mar 14, 2015
@zacharytamas
Copy link

I'm seeing this behavior as well.

@kevinpschaaf
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants