This is a working example of using the MutationObserver API to listen to changes in an DOM element's attributes.
Clicking the button triggers a change and in turn MutationObserver
will notice the change.
Logs available in the console.
// Required: | |
@import 'node_modules/bootstrap/scss/functions'; | |
@import 'node_modules/bootstrap/scss/mixins'; | |
@import "node_modules/bootstrap/scss/variables"; | |
// Optional, comment out or remove leaving the only ones needed: | |
@import "node_modules/bootstrap/scss/root"; | |
@import "node_modules/bootstrap/scss/reboot"; | |
@import "node_modules/bootstrap/scss/type"; | |
@import "node_modules/bootstrap/scss/images"; |
/** | |
* Gettext Scanner Script for Twig Projects | |
* v1.3 | |
* | |
* Developed by Luís Silva | |
* https://github.com/luism-s | |
*/ | |
/** | |
* Purpose: |
/* | |
* How Javascript scope works using let and const | |
* It is more restrictive as to where values can be accessed within functions and blocks | |
*/ | |
// This variable can be accessed from anywhere. | |
const globalScopeVar = 'Can be accessed from anywhere (global scope)'; | |
function parentScope() { | |
// This variable can only be accessed within this function and its child function and code blocks. |
.git | |
tmp | |
!tmp/pids | |
log | |
public/assets | |
public/packs | |
.bundle | |
db/*.sqlite3 | |
db/*.sqlite3-* |
This is a working example of using the MutationObserver API to listen to changes in an DOM element's attributes.
Clicking the button triggers a change and in turn MutationObserver
will notice the change.
Logs available in the console.