This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function flatten_array( arr ){ | |
/** | |
* Checks if _arr is an array | |
* @param Array|Mixed _arr variable to check | |
* @return Bool whether _arr is an array | |
*/ | |
const is_array = ( _arr ) => { | |
return typeof _arr === "object" && typeof _arr.concat === "function"; | |
}; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener('DOMContentLoaded', function() { | |
/** | |
* Refrence to object element that has svg as data attribute | |
**/ | |
const obj = document.querySelector('object'); | |
const svg = obj.contentDocument.querySelector("svg"); | |
svg.style.fill = "red" // change fill color to red | |
}, false); |
OlderNewer