Skip to content

A simple way of accessing CSSOM to read/modify the stylesheet and use MutationObserver to detect changes in the DOM.

License

Notifications You must be signed in to change notification settings

TainanReis/CSSOM-and-MutationObserver-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CSSOM-and-MutationObserver-example

A simple way/tutorial of accessing CSSOM to read/modify the stylesheet and use MutationObserver to detect changes in the DOM. It was hard to find information about this. I mean, most of the examples were incomplete or applied only to the inline attributes.

What this does: changes the textbox background color every time a new child is added to a div.

Live example: https://codepen.io/tainan/pen/vvzbwv

Helpful Links (ordered by the good content):

CSSOM:

MutationObserver:

About

A simple way of accessing CSSOM to read/modify the stylesheet and use MutationObserver to detect changes in the DOM.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages