Skip to content

Latest commit

 

History

History
44 lines (35 loc) · 2.48 KB

porting-chrome-extensions.md

File metadata and controls

44 lines (35 loc) · 2.48 KB
ms.assetid description title author ms.author ms.date ms.topic ms.prod keywords ms.custom
1319a070-c6e3-4592-9f4b-40ce1575851f
Learn how to port your Chrome extension to Microsoft Edge using the Microsoft Edge Extension Toolkit.
Porting Chrome extensions
MSEdgeTeam
msedgedevrel
02/08/2017
article
microsoft-edge
edge, web development, html, css, javascript, developer
seodec18

Porting an extension from Chrome to Microsoft Edge

Porting an extension from Chrome to Microsoft Edge is made easy with the help of the Microsoft Edge Extension Toolkit. This developer tool converts an unpacked Chrome extension to an unpacked Microsoft Edge extension by bridging APIs and surfacing any errors in your manifest.json file.

API bridges

In order to allow for seamless porting of Chrome APIs to supported Microsoft Edge APIs, two scripts are added to your extension's folder. These scripts bridge APIs (polyfiling where necessary), meaning you won't have to worry about changing any Chrome specific code in your background script or content scripts.

After conversion, you will see them included in the manifest file of your extension with the "-ms-preload" key:

"-ms-preload": {
  "backgroundScript": "backgroundScriptsAPIBridge.js",
  "contentScript": "contentScriptsAPIBridge.js"
}

Using the Microsoft Edge Extension Toolkit

The following instructions detail how to convert your Chrome extension to run on Microsoft Edge in the Windows 10 Anniversary Update edition:

  1. Install the Microsoft Edge Extension Toolkit.
  2. Make a copy of your Chrome extension's folder for safe keeping. The conversion process will overwrite the code.
  3. Run the Microsoft Edge Extension Toolkit and load the copy of your extension.
    load extension button
  4. Correct all the errors that are reported within the tool's text editor. Select "Re-validate" to check for errors after making corrections.
    extension-toolkit finding errors
  5. Select "Save files".

You can now exit out of the toolkit and load your extension in Microsoft Edge!

You can search for known platform issues with the EdgeHTML issue tracker. If you think you've found something new, open an issue!