Hello,
[In chrome browser]
Extension is working good, and the chrome.scripting.executeScript returned the excepted result.
[In orion browser]
running the code, it returned null
Code example:
function getData() {
// Use 'any' to bypass TypeScript checks for non-standard window properties
const _window = window as any;
try {
const config = _window.localStorage.getItem('APP_CONFIG');
return {
config: config ? JSON.parse(config) : null,
};
} catch (e: unknown) {
// Ensure error is serializable
return { error: e instanceof Error ? e.message : String(e) };
}
}
// Get results after select needed tab
const results = await chrome.scripting.executeScript({
target: { tabId: tab.id },
world: 'MAIN',
func: getData,
});
My extension manifest.json
{
"manifest_version": 3,
"name": "Test Extension",
"description": "A Chrome extension for test",
"background": { "service_worker": "background.bundle.js" },
"action": {
"default_popup": "popup.html",
"default_icon": "favicon-667d5fa9.png"
},
"icons": {
"128": "favicon-667d5fa9.png"
},
"content_scripts": [
{
"matches": [
"http://*/*",
"https://*/*",
"<all_urls>"
],
"js": ["contentScript.bundle.js"],
"css": ["content.styles.css"]
}
],
"web_accessible_resources": [
{
"resources": ["content.styles.css", "favicon-667d5fa9.png"],
"matches": []
}
],
"permissions": [
"alarms",
"tabs",
"activeTab",
"storage",
"scripting",
"unlimitedStorage",
"webRequest",
"webNavigation"
],
"host_permissions": [
"http://*/*",
"https://*/*",
"<all_urls>"
]
}
My orion version info:
Orion
Version 0.99.133-beta (WebKit 621.1.2.111.4)
Build date April 21, 2025
MacBook Pro (macOS Sequoia 15.4.1 build 24E263)
I expect to receive true result of chrome.scripting.executeScript function
in our case it must be:
{
config: {
...
}
}
from results[0].result
MacOS, Version 0.99.133-beta