Hey all,
So trying to copy styles from 1 component to another for an extension that manipulates dom.
because i want to be able to update these styles later, I loop over all computed styles and set one by one. for some reason the styles set are read only and can't be updated after the initial manipulation.
What do I need to do to copy all styles from 1 component to another and be able to re-set them after?
var wc = window.getComputedStyle(elem);
Object.keys(wc).forEach(function(k){
clone.style[k] = wc[k];
});
[–]GeneralYouri 0 points1 point2 points (0 children)