public static void addToHeader ( final String scriptname ) { if ( ! CssResources . isInHeader ( scriptname ) ) { final LinkElement styleLinkElement = Browser . getDocument ( ) . createLinkElement ( ) ; styleLinkElement . setRel ( CssResources . REL_TYPE ) ; styleLinkElement . setType ( CssResources . SCRIPT_TYPE ) ; styleLinkElement . setHref ( scriptname ) ; Browser . getDocument ( ) . getHead ( ) . appendChild ( styleLinkElement ) ; } }
add css script to header .