Closed utubo closed 1 year ago
ใใใซใใณใใใชใใใชใ https://dxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/browser.js
L.3441ใๆชใใ
let tab = BrowserApp.addTab(aURI ? aURI.spec : "about:blank", { flags: loadflags,
L.1674ใฎใใใคใๆฏ้ ใงใใใฐ่ฒใ ใงใใ
onEvent: function (event, data, callback) {
L.1927 ใใใง้ใใใใช๏ผ
case "Tab:OpenUri":
window.browserDOMWindow.openURI(Services.io.newURI(data.uri),
/* opener */ null,
Ci.nsIBrowserDOMWindow[data.flags],
Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL,
/* triggeringPrincipal */ null);
ใใใใชใผ
var Ci = Components.interfaces;
var Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
window.browserDOMWindow.openURI(
Services.io.newURI(data.uri),
null, // opener
Ci.nsIBrowserDOMWindow.OPEN_NEWTAB,
Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL,
null // triggeringPrincipal
);
XPCOMUtils
ใ๏ฝโฆ
about:home
no longer exists on mobile
๐ข๐ข๐ข๐ข๐ข
https://bugzilla.mozilla.org/show_bug.cgi?id=1400555
location.href ='about:home'
๐ข This does not work.tabs.create({url:'about:home'})
๐ข This does not work.tabs.create({url:'about:home#'})
๐ข This does not work.tabs.create({url:'about:home?'})
๐ข This does not work.tabs.create({})
๐ข "about:blank" is opened.webRequest.onBeforeRequest
๐ข "about:blank" is opened.webNavigation.onBefore
๐ข This can't redirect.<a href="about:home">click me</a>
๐ข This link does not work.window.BrowserApp.addTab('about:home')
on background.js ๐ข BrowserApp is undefined.window.BrowserApp.addTab('about:home')
on content.js ๐ข BrowserApp is undefined.tabs.duplicate(/*"about:home"'s tabId*/)
๐ข This does not work.location.replace('about:home')
๐ข This does not work.location.assgin('about:home')
๐ข This does not work.tabs.update(tabId, { url: 'about:home' })
๐ข This does not work.