Share handler code for browseStyle/browseSource.