{"id":24534,"date":"2018-05-25T02:26:53","date_gmt":"2018-05-24T17:26:53","guid":{"rendered":"https:\/\/jirak.net\/wp\/new-features-for-extensions-in-the-windows-10-april-2018-update\/"},"modified":"2018-05-25T02:34:57","modified_gmt":"2018-05-24T17:34:57","slug":"new-features-for-extensions-in-the-windows-10-april-2018-update","status":"publish","type":"post","link":"https:\/\/jirak.net\/wp\/new-features-for-extensions-in-the-windows-10-april-2018-update\/","title":{"rendered":"New features for extensions in the Windows 10 April 2018 Update"},"content":{"rendered":"<p>New features for extensions in the Windows 10 April 2018 Update<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jirak.net\/wp\/wp-content\/uploads\/2018\/05\/e15cb26ce19cd85a9013eae2d0a9921c-1024x322.png\" width=\"1024\" height=\"322\"><\/p>\n<p>The <a href=\"https:\/\/aka.ms\/edge17\">Windows 10 April 2018 Update<\/a> includes several incremental improvements to API support, functionality, and end-user discoverability for the extensions platform in Microsoft Edge. In this post, we\u2019ll walk through the biggest improvements, and how you can get started enhancing your extensions with new features.<\/p>\n<h2>Extensions can now be enabled for InPrivate browsing<\/h2>\n<p>In previous releases, extensions could not be enabled during an inPrivate browsing session. Beginning with this release, users can now choose to allow extensions to run during inPrivate browsing on a case-by-case basis \u2013 either when the extension is initially installed (by selecting the \u201cAllow for inPrivate browsing\u201d checkbox), or at any later time by visiting the Settings page for a given extension.<\/p>\n<p>When running inPrivate, extensions can run in either <a href=\"https:\/\/developer.mozilla.org\/en-US\/Add-ons\/WebExtensions\/manifest.json\/incognito\"><strong><code>split<\/code><\/strong> or <strong><code>span<\/code><\/strong> mode<\/a> as specified by <a href=\"https:\/\/developer.mozilla.org\/en-US\/Add-ons\/WebExtensions\">the WebExtensions API<\/a>. In <code>span<\/code> mode (the default), the extension spans both inPrivate and non-private windows; windows and tabs from an inPrivate instance are indicated to the extension with an <code>incognito<\/code> property. In <code>split<\/code> mode, a separate instance of the extension is created for inPrivate and normal browsing, and the two copies are isolated (the inPrivate copy cannot see non-private windows, and the non-private copy cannot see inPrivate windows).<\/p>\n<div id=\"attachment_22773\" style=\"width: 1034px\" class=\"wp-caption alignright\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-22773\" src=\"https:\/\/blogs.windows.com\/uploads\/mswbprod\/sites\/33\/2018\/05\/e15cb26ce19cd85a9013eae2d0a9921c-1024x322.png\" alt=\"Screen capture showing the OneNote Web Clipper in Microsoft Edge in an inPrivate window.\" width=\"1024\" height=\"322\" \/><\/p>\n<p class=\"wp-caption-text\">Extensions are now available when browsing inPrivate<\/p>\n<\/div>\n<p>Extensions in <code>span<\/code> mode can be debugged as with a normal extension. Extensions in <code>split<\/code> mode can be debugged separately for each instance, as the background script is separate for normal and InPrivate sessions.<\/p>\n<div id=\"attachment_22770\" style=\"width: 223px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/blogs.windows.com\/uploads\/mswbprod\/sites\/33\/2018\/05\/11f166b28d4968494dd3498f0759bb8a.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-22770 size-medium\" src=\"https:\/\/blogs.windows.com\/uploads\/mswbprod\/sites\/33\/2018\/05\/11f166b28d4968494dd3498f0759bb8a-213x300.png\" alt=\"Screen capture showing the settings page for an extension.\" width=\"213\" height=\"300\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">The background script is separate for normal and inPrivate sessions.<\/p>\n<\/div>\n<h2>Introducing the Notifications API for extensions<\/h2>\n<p>Extensions can now display interactive notifications , including basic messages, progress indicators, lists, and more. Developers can customize the appearance of these notifications by configuring the icon, text, buttons, and button icons.<\/p>\n<div id=\"attachment_22776\" style=\"width: 1034px\" class=\"wp-caption alignright\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-22776\" src=\"https:\/\/blogs.windows.com\/uploads\/mswbprod\/sites\/33\/2018\/05\/21cd02f9252a50eb5eedc2352550cd5c-1024x652.png\" alt=\"Screen capture showing examples of progress, list, image and basic notifications\" width=\"1024\" height=\"652\" \/><\/p>\n<p class=\"wp-caption-text\">Examples of progress, list, image and basic notifications<\/p>\n<\/div>\n<p>In the sample below, we\u2019ll demonstrate the process to create a basic notification. The first step is to define the notification options:<\/p>\n<p>https:\/\/gist.github.com\/balajek\/b91fdd5333330c206891cc1c73e779bf<\/p>\n<p>Next, we\u2019ll add event listeners for various user interactions:<\/p>\n<p>https:\/\/gist.github.com\/balajek\/a3c20091a669df05aeee26ac82807c9a<\/p>\n<p>The notification can now be invoked:<\/p>\n<p>https:\/\/gist.github.com\/balajek\/a4fef1d936e8723c5ad1a4f8c01d4899<\/p>\n<p>Notifications sent from an extension use the standard Windows notification service, appearing in Action Center until an action is taken. Users have full control over notifications, and can choose to suppress notifications originating from a specific extension using either the extension&#8217;s menu in Microsoft Edge or by acting on an individual notification in the Windows Action Center.<\/p>\n<div id=\"attachment_22767\" style=\"width: 1034px\" class=\"wp-caption alignright\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-22767\" src=\"https:\/\/blogs.windows.com\/uploads\/mswbprod\/sites\/33\/2018\/05\/03f0afb2c64966f8b9379a55bccfaa13-1024x547.png\" alt=\"Screen capture showing hte option to &quot;turn off notifications for this extension&quot; in Action Center\" width=\"1024\" height=\"547\" \/><\/p>\n<p class=\"wp-caption-text\">Users can suppress notifications for an extension from the Action Center or the extension settings<\/p>\n<\/div>\n<p>Extension developers can determine if notifications are enabled or disabled using the <strong>getPermissionLevel()<\/strong> method:<\/p>\n<p>https:\/\/gist.github.com\/balajek\/4bc4f7750ed34811acd6a14e33fa035c<\/p>\n<p>The event<strong> <code>onPermissionLevelChanged<\/code><\/strong> will be raised if the user changes the notification permission:<\/p>\n<p>https:\/\/gist.github.com\/balajek\/5dc3062eedd3f5c9629c4dbc948d1906<\/p>\n<h2>Support for Tabs.reload()<\/h2>\n<p>Microsoft Edge extensions now support the <code>tabs.reload()<\/code> method in the <code>tabs<\/code> API class, allowing extensions to directly reload a specific tab using this method.<\/p>\n<h1>What\u2019s next for extensions<\/h1>\n<p>We are continuing to make enhancements to extensions platform for future releases. You can see a snapshot of our current roadmap on Microsoft Docs at <a href=\"https:\/\/docs.microsoft.com\/en-us\/microsoft-edge\/extensions\/api-support\/extension-api-roadmap\">Microsoft Edge Extension API roadmap<\/a>. To get started building your extension for Microsoft Edge, check out <a href=\"https:\/\/docs.microsoft.com\/en-us\/microsoft-edge\/extensions\/getting-started\">Getting started with extensions<\/a>.<\/p>\n<p>We look forward to your feedback on these improvements! You can vote on the most important features for your extension development on the <a href=\"https:\/\/wpdev.uservoice.com\/forums\/257854-microsoft-edge-developer\">Microsoft Edge Developer UserVoice<\/a>, or share your feedback in the comments below.<\/p>\n<p>\u2013 Balaje Krishnan, Senior Program Manager, Microsoft Edge<\/p>\n<p>Source: <a href=\"http:\/\/blogs.windows.com\/msedgedev\/2018\/05\/24\/new-extension-features-april-2018-update-notifications-inprivate\/\" target=\"_blank\">New features for extensions in the Windows 10 April 2018 Update<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>New features for extensions in the Windows 10 April 2018 Update The Windows 10 April 2018 Update includes several incremental improvements to API support, functionality, and end-user discoverability for the extensions platform in Microsoft Edge. In this post, we\u2019ll walk through the biggest improvements, and how you can get started enhancing your extensions with new features. Extensions can now be enabled for InPrivate browsing In previous releases, extensions could not be enabled during an inPrivate browsing session. Beginning with this release, users can now choose to allow extensions to run during inPrivate browsing on a case-by-case basis \u2013 either when the extension is initially installed (by selecting the \u201cAllow for inPrivate browsing\u201d checkbox), or at any later time by visiting the Settings page for a given extension. When running inPrivate, extensions can run in either split or span mode as <a class=\"mh-excerpt-more\" href=\"https:\/\/jirak.net\/wp\/new-features-for-extensions-in-the-windows-10-april-2018-update\/\" title=\"New features for extensions in the Windows 10 April 2018 Update\">[ more&#8230; ]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":24540,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[169],"tags":[201],"class_list":["post-24534","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news","tag-windows"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/jirak.net\/wp\/wp-json\/wp\/v2\/posts\/24534","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jirak.net\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jirak.net\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jirak.net\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jirak.net\/wp\/wp-json\/wp\/v2\/comments?post=24534"}],"version-history":[{"count":1,"href":"https:\/\/jirak.net\/wp\/wp-json\/wp\/v2\/posts\/24534\/revisions"}],"predecessor-version":[{"id":24541,"href":"https:\/\/jirak.net\/wp\/wp-json\/wp\/v2\/posts\/24534\/revisions\/24541"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jirak.net\/wp\/wp-json\/wp\/v2\/media\/24540"}],"wp:attachment":[{"href":"https:\/\/jirak.net\/wp\/wp-json\/wp\/v2\/media?parent=24534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jirak.net\/wp\/wp-json\/wp\/v2\/categories?post=24534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jirak.net\/wp\/wp-json\/wp\/v2\/tags?post=24534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}