Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createElement at runtime #83

Open
messizqin opened this issue Jan 10, 2022 · 0 comments
Open

createElement at runtime #83

messizqin opened this issue Jan 10, 2022 · 0 comments

Comments

@messizqin
Copy link

Hi there, thanks very much for making this awesome project. I have a request if I may. I use javascript to create Dom element at runtime, and tries to apply dark mode on it after created.

let darkmode = new Darkmode(options);
let el = document.createElement('div');
el.style.width = '200px';
el.style.height = '200px';
el.style.background = 'red';
document.body.appendChild(el);
darkmode.toggle();

however, createElement will not be rendered. in my project, I create a lot of element through javascript at runtime, I wonder if there is a way I can get the entire page rendered including elements those created by javascript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant