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

Fix css refresh on elements added to <body> #372

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AlexisPuga
Copy link

Hi!

Is this project still maintained? I made this modification because I need it for a project, but if you can merge it, it would be great.

Basically, adding a tag outside the element (in the , for example)
causes the following error in the console:
"Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node."

This commit fixes that (at least in Firefox) by using the parentNode of
the element to remove it.

It also adds tests for CSS refreshing, but not as I would like...

PS: Some tests didn't pass in my machine (the --quiet and --port ones). I don't know why, but it has to do nothing with these modifications.

Anyway... I hope you're doing well, and thank you for your time!

Ignore package-lock.json as it wasn't added previously.
Adding a <link> tag outside the <head> element (in the <body>, for example)
causes the following error in the console:
"Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node."

This commit fixes that (at least in Firefox) by using the parentNode of
the <link> element to remove it.

* Add tests for CSS refreshing in test/css.js

* Add test/data/css-refreshing-body.html
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

Successfully merging this pull request may close these issues.

1 participant