Fixes for Safari and Firefox in dartdoc-viewer

BUG=
R=jmesserly@google.com

Review URL: https://chromiumcodereview.appspot.com//103803010