1 year ago

#172898

test-img

Leo

MDC web through CDN - when to apply attachTo?

I am using MDC web loaded from CDN. Document for CDN users is better now when some years ago when I started. But I have problem with attachTo.

I build HTML elements with JavaScript and append them to the DOM. I got errors when applying attachTo before appending to the DOM. After testing (and searching for info) I decided to use a workaround, something like setTimeout(()=> ... apply attachTo here, 10).

Coming back to this some years later I wonder if there is any official way to do this now?

javascript

material-design

cdn

mdc-components

0 Answers

Your Answer

Accepted video resources