I am trying to use paper-button
with type
attribute set to submit
(as one would do with button
element) to submit the enclosing form
, but for some reason it is unable to submit the form. Is this a bug or feature?
How to make paper-button
submit the form?
PS: I am in dart land (not js).
As noticed by Gunter, you can create a custom element which extends some of native element with your desired semantics.
I encountered with your issue too and I've created simple element which gives ability to submit to paper-button
<polymer-element name="paper-button-submit" extends="button" noscript>
<template>
<style>
:host {
border: 0;
background: transparent;
padding: 0;
font-size: inherit;
}
</style>
<paper-button>
<content></content>
</paper-button>
</template>
</polymer-element>
Then you can write this
<button type="submit" is="paper-button-submit">Add</button>
And will get a button with paper-like look