Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

urth-core-function argument properties should declare types with polymer #250

Open
peller opened this issue Mar 7, 2016 · 1 comment
Open
Labels

Comments

@peller
Copy link
Collaborator

peller commented Mar 7, 2016

For example, if a function argument is a boolean, passing in "true" should be treated as a boolean, not a string.

To test, I changed the test case in 3b to use "false" instead of "{{checked}}":

%%html
<template is="dom-bind">
    <urth-core-function id="f3b" ref="aFunctionWithBoolean" arg-b="false" result="{{res}}" auto></urth-core-function>
    <paper-toggle-button checked="{{checked}}"></paper-toggle-button>
    <span>{{res}}</span> World
</template>
@lbustelo
Copy link
Collaborator

lbustelo commented Mar 8, 2016

Here is a summary of the problem.

When the element initializes, there is code that reads the arg-* attributes and put their values in the args property. At this point, there is no information about the function signature, so types are unknown. Later on a signature arrives. At this point we would need to do the following:

  1. Check if the param in the signature has type information
  2. If there is a value in args and it is string type, then coarse the value to the type in the signature
  3. Set that value as the default value of the dynamically created arg.* property.

@lbustelo lbustelo removed their assignment Aug 30, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants