I am doing some work on the CSS / JS plugin. I want to write something like this in my stylesheet:
.whatever { background: -custom-renderer("ctx.beginPath(); ctx.moveTo(0, 40); ctx.lineTo(240, 40); ctx.moveTo(260, 40); ctx.lineTo(500, 40); ctx.moveTo(495, 35); ctx.lineTo(500, 40); ctx.lineTo(495, 45);") repeat-x; background: rgb(30, 30, 30);
I will need to access this property using Javascript and rewrite it with another property. Now the problem is that all the methods that I know ( document.styleSheets[1].cssRules , document.defaultView.getMatchedCSSRules , etc.) tend to show only the return property (which is usually great behavior).
Jakub hampl
source share