vctrl
vctrl

Reputation: 23

How to open paper-dialog not on click

I have a function Clickandler(event) to show paper-dialog on click some button.

I want just to show paper-dialog on the page without pressing button, how can I do it?

Upvotes: 0

Views: 67

Answers (1)

jimi dough10
jimi dough10

Reputation: 2016

paper-dialog has a opened attribute. you can add that to your dialog and by default it will be opened

<paper-dialog id="someDialog" opened>

or in javascript

document.querySelector('#someDialog').open();

or

document.querySelector('#someDialog').opened = true;

Upvotes: 2

Related Questions