microsoft-edge-extension

Edge: browserAction.setIcon not working when using a default icon with multiple sizes

こ雲淡風輕ζ 提交于 2019-12-24 07:32:34
问题 I can't get browser.browserAction.setIcon to work in Microsoft Edge when manifest.json is specifying a default icon in multiple sizes: manifest.json { "manifest_version": 2, "name": "test", "version": "0.0.1", "author": "John Doe", "background": { "scripts": ["background.js"], "persistent": false }, "browser_action": { "default_icon": { "19": "icon.png", "38": "icon2.png" } } } background.js setInterval(function() { browser.browserAction.setIcon({ path: "testimage.png" }); }, 2000); No error

Can't get Edge to Return a Promise in my WebExtension

夙愿已清 提交于 2019-12-22 16:35:52
问题 I am trying to create a new tab using browser.tabs.create() from my background.js WebExtension as shown here: createTab: function () { var newTab = browser.tabs.create({ url: someUrl }); newTab.then(onCreated, onError); } The new tab creates in the browser , but when the last line is reached, an error is thrown: SCRIPT5007: Unable to get property 'then' of undefined or null reference The Locals window shows newTab is undefined . What am I doing wrong here? I thought that .create() would

How do you determine identity in a Microsoft Edge extension?

徘徊边缘 提交于 2019-12-13 03:36:15
问题 In a Chrome extension a developer is able to determine user identity using the following: chrome.identity.getProfileUserInfo(function callback) Microsoft Edge does not seem to have the same functionality. Is anyone aware of a method for determining user identity inside a Microsoft Edge extension? According to Microsoft's documentation it looks like it's in consideration for development but I was hoping somebody had found another way to do this: for reference (https://docs.microsoft.com/en-us

Firefox / Chrome / MS Edge extensions using chrome.* or browser.*

旧城冷巷雨未停 提交于 2019-12-12 16:15:57
问题 So I couldn't find anything that talked about using chrome.* or browser.* specifically. In some of the WebExtension examples it uses browser.* ( browser.runtime.getManifest(); ) https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/runtime/getManifest, and in others it uses chrome.* ( chrome.notifications.create ), https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/notifications. I'm not entirely sure what's the difference. Is it contextual? Both chrome.* and browser.* are

How to load packed (but not signed) Edge extension?

跟風遠走 提交于 2019-12-12 04:19:46
问题 I know how to load unpacked Microsoft Edge extension. Now I have my extension packed (but not signed yet) to a .appx file. Can I load the extension via the .appx file? I tried to open the .appx file by double-click on it, it shows: Installation failed Reason: This one isn't signed with a trusted certificate. 回答1: Yes, you can install an Edge extension from a package, but it must be signed by the certificate which should be added to the trusted people store as described in the documentation.

Packging of Edge Extension which support nativemessaging(UWP app)

时间秒杀一切 提交于 2019-12-11 06:35:47
问题 I developed an extension which uses native messaging to communicate with backend uwp application. How can I package it? When I install the package, will it install the edge extension as well which is a part of the package. 回答1: I have successfully built a package with the edge extension by the following steps. Hope this will help you~ Build the project as following structure in C\EdgeExtension\Appx: 1. fullTrustProcess If there is fullTrustProcess, the exe should be included in TrustedProcess

How to run Native Messaging example on Microsoft Edge?

孤街浪徒 提交于 2019-12-07 23:49:17
问题 I want to run SecureInput example but after I built and deployed NativeMessagingInProcess project, Extension loaded on Edge but secureinput.html file don't load content.js file. And, I checked on regedit, nothing isn't added. Did I do anything wrong? This's very different from Chrome and Firefox Native messaging extension. 回答1: Have you hosted secureinput.html in a web server? Have you run it on Windows 10 insider preview build? According to Microsoft Edge extension API roadmap, Native

Communication between content script and background script in Microsoft Edge

给你一囗甜甜゛ 提交于 2019-12-07 20:09:22
问题 I have a problem with communication based on browser.runtime.connect between a content script and a background script of my test echo extension. I have published my code and extension package on github. Short description of this extension. You can run the extension on this GitHub test page. The content script connects to the background script using browser.runtime.connect and sends a message via browser.runtime.Port object when “Submit” button is clicked. The background script receives the

Angular expression evaluates in Chrome extension but not in Edge extension

南楼画角 提交于 2019-12-06 18:52:30
问题 I have a simple browser extension, using Angular (v1.6.3), but the Angular expression in the pop-up window of the browser extension is failing to evaluate in Edge, but it is in Chrome. The Angular expression is simply <div>{{2+2}}</div> . When I browse to a relevant website (as configured in the manifest file, namely http://marketplace.visualstudio.com, https://marketplace.visualstudio.com or http://www.bbc.com, and click the extension button, Chrome evaluates the html output to "4", but Edge

Edge: In-Process native extension and Windows.System.Launcher.LaunchFileAsync

≯℡__Kan透↙ 提交于 2019-12-06 16:58:31
问题 I have developed an edge browser extension (native messaging) using the in-process mechanism as described here (through an activation of OnBackgroundActivated ). Within OnBackgroundActivated , or to be more specific in OnAppServiceRequestReceived of the established app service connection, I am attempting to call Windows.System.Launcher.LaunchFileAsync(IStorageFile) . This doesn't appear to happen on the UI-Thread (although it does work in debug mode with a debugger attached). The problem that