Styling Perspective Tree branches?

yeah scripts dont run on load like this, thats why i wrap my scripts in the onload of an img object

	code =  """<img style='display:none' src='/favicon.ico' onload=\"
		console.log('hey');				
	\"></img>""".replace("\n", "").replace("\t", "")
	return code

Do note that the added a css sheet will not disspear, when closing the view, and if you open a new view a second css sheet will be made... (i think)
Css sheets also can get cached, so this might turn out ugly after a while.

Its better to just add in a <style> object instead of a script (or the onload img) for css related injections. and use python to generate your style "dynamicaly"

styles=".iaDropdownCommon_options [data-label='YourLabel']:before { content: url('/system/images/Builtin/icons/16/check2.png');	}"
	code =  """<style>
		"""+styles+"""
	\"></style>""".replace("\n", "").replace("\t", "")
	return code
2 Likes