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

using javascript core functions #1641

Closed
zishanj opened this issue May 28, 2015 · 2 comments
Closed

using javascript core functions #1641

zishanj opened this issue May 28, 2015 · 2 comments

Comments

@zishanj
Copy link

zishanj commented May 28, 2015

Why I can't use javascript core functions like String.fromCharCode directly inside double-mustache?

@kevinpschaaf
Copy link
Member

Polymer currently only supports using inline functions defined on the element prototype, for simplicity.

Marking this as an enhancement request for now. In the meantime, you can do

{{fromCharCode(foo)}}

and

fromCharCode: function(val) {
   return String.fromCharCode(val);
}

If you'd like to use that in a lot of elements, you can define fromCharCode in a behavior that is shared among multiple elements.

@zishanj
Copy link
Author

zishanj commented May 28, 2015

Thanks... It would be great if this enhancement is implemented in future release.

@zishanj zishanj closed this as completed May 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants