implement viewApp function and browser.internal.app option