private void removeCssLinks ( ) { if ( this . isInit ) { return ; } this . isInit = true ; // Remove all existing link element NodeList < Element > links = this . getHead ( ) . getElementsByTagName ( LinkElement . TAG ) ; int size = links . getLength ( ) ; for ( int i = 0 ; i < size ; i ++ ) { LinkElement elem = LinkElement . as ( links . getItem ( 0 ) ) ; if ( "stylesheet" . equals ( elem . getRel ( ) ) ) { elem . removeFromParent ( ) ; } } }
Removes all link tags in the head if not initialized .