var WindowUtils = require("sdk/window/utils");
var windows = require("sdk/windows").browserWindows;

windows.on("open", function() {
	var window = WindowUtils.getMostRecentBrowserWindow()
	if (WindowUtils.isBrowser(window) && !window.fullScreen) {
		window.BrowserFullScreen();
	}
});

var WindowUtils = require("sdk/window/utils");
var windows = require("sdk/windows").browserWindows;
var { viewFor } = require("sdk/view/core");

windows.on("open", function(browserWindow) {
	var chromeWindow = viewFor(browserWindow);
	if (WindowUtils.isBrowser(chromeWindow) && !chromeWindow.fullScreen) {
		chromeWindow.BrowserFullScreen();
	}
});

Convert the BrowserWindow object to a chrome window object instead of using getMostRecentBrowserWindow
Convert the BrowserWindow object to a chrome window object instead of using getMostRecentBrowserWindow
