paper-radio-group add layout vertical left

139 views
Skip to first unread message

ihu...@netpremacy.com

unread,
Apr 9, 2015, 10:24:14 AM4/9/15
to polym...@googlegroups.com
Hi,

Using javascript I am creating new page elements and then adding with appendChild

var paper_radio_group = document.createElement("paper-radio-group");

Using javascript is it possible to also add "layout vertical left" as an attribute of paper_radio_group to create the following.

<paper-radio-group layout vertical left>
</paper-radio-group>

Kind regards,
Ian.

Rob Dodson

unread,
Apr 9, 2015, 3:42:43 PM4/9/15
to ihu...@netpremacy.com, polymer-dev
for boolean attributes you normally do something like setAttribute('hidden', 'hidden'). That would giv you <div hidden>. But I think that only works for attributes the browser already recognizes.

For the attributes that we just made up (layout, et al.) you can just do setAttribute('layout', true). That will give you <paper-radio-group layout="true"> which I believe is totally fine. The actual layout.css is just looking for the existence for a [layout] attribute and doesn't care what the value is.

Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/09691669-a666-43bf-bd0f-be8d02a1feab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages