The problem is that a static html widget is not a template, so you can't use any variables, only html. You would have to use a php direct execution type widget and set $output to your html (although getting quotes and escape characters right can be tricky). You could also make your html a template then just use a php type widget that renders your template, like:
Code:
$template = vB_Template::create('my_widget_template');
$output = $template->render();
unset($template);
Then in your template you can use
Code:
var name = '{vb:escapeJS {vb:raw bbuserinfo.username}}';