Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Microsoft Edge #31

Open
ChrisdelaC opened this issue Aug 2, 2018 · 16 comments

Comments

@ChrisdelaC
Copy link

commented Aug 2, 2018

Hello, I am sorry for posting this question here, but is there any plan to launch an extension for Microsoft Edge? There is no extension that offers what xBrowserSync does.

I understand there is a Microsoft's tool to port Chrome extensions to Edge: https://docs.microsoft.com/en-us/microsoft-edge/extensions/guides/porting-chrome-extensions

Thanks in advance for your attention.

@nero120

This comment has been minimized.

Copy link
Member

commented Aug 2, 2018

Hi @ChrisdelaC, no worries at all that's what the issues list is for!

From this page it appears that most of the web extension apis that xBrowserSync uses are supported, so technically it should be possible.

I'm currently working on Firefox support that will be released shortly, then I was going to look at Opera support so I'll see if I can get Edge done at the same time.

@ChrisdelaC

This comment has been minimized.

Copy link
Author

commented Aug 2, 2018

Wow! That's awesome! I'd like to help if possible, I'm also a developer, but I'm pretty a beginner with things like extensions and this stuff. Good luck with supporting Firefox too.

Regards!

@nero120

This comment has been minimized.

Copy link
Member

commented Aug 8, 2018

Thanks @ChrisdelaC, if you want to have a go at creating a version for Edge then here's what you'd need to do:

  1. Fork the repo from the v1.4.0 branch (lot's of updates/fixes included in the Firefox release that hasn't been merged to master yet).
  2. Copy the platform/chrome folder to platform/edge, as this implementation is closest to Edge's requirements (e.g. API functions use callbacks like Chrome, not promises like Firefox).
  3. Update scripts in package.json to add tasks for edge by copying the prebuild:chrome, build:chrome and postbuild:chrome tasks and renaming chrome to edge, then edit the build task to point to the edge platform folder.
  4. Work on updating the javascript files inside the platform/edge folder to work with Edge's web extension API implementation, and it's native bookmarks implementation.

If you're willing to give that a go then once I have a chance to work on the Edge implementation I can take your fork and merge it into a new release branch here to continue/finish it off.

@ChrisdelaC

This comment has been minimized.

Copy link
Author

commented Aug 9, 2018

Thanks for the intro. Right now I've just only initialized platform/edge and the build tags. I'm not sure how to start updating the JS files inside the path since some of them doesn't seem to be using the Chrome callbacks. The background JS seems the only one to be using them.

Just for curiosity, I tried the Microsoft tool to port extensions, but when I loaded it to Edge the UI doesn't show itself. You can find it attached below:

edge.zip

Regards.

@nero120

This comment has been minimized.

Copy link
Member

commented Aug 9, 2018

You'll find all of the chrome web extension API calls in platformImplementation.js and background.js which implement the platform-specific logic and web extension background page functionality respectively.

I probably wouldn't use the Microsoft tool as xbs was architected to be multi-platform, it's just a case of updating the platform folder files as needed.

No rush though as I won't get to this for months, so have a play with it and see how you get on. Any questions feel free to post here.

@ChrisdelaC

This comment has been minimized.

Copy link
Author

commented Aug 10, 2018

Hi again, I went ahead to look and compare some APIs, and I just tried to initialize the extension, but while debugging it throws an error saying that angular is not recognized. Is that the one that allows the architecture to be multiplatform?

I found that, actually, Angular supports Microsoft Edge, so I think I am missing something here.

Regards.

@ChrisdelaC

This comment has been minimized.

Copy link
Author

commented Aug 10, 2018

Please forget it. I just was loading the extension package, but not compiling. Now the extension UI loaded, so I will test it.

UPDATE: I noticed that some APIs are not supported yet on Edge, as you can see in the screenshot below:

image

And when trying to sync data by sign-in in the extension, this error is thrown:

image

I did a little research and I found that TextEncoder support is in development for Edge. Is there a way to avoid text encoding so the extension can partially work?

Thanks in advance.

@nero120

This comment has been minimized.

Copy link
Member

commented Aug 10, 2018

I noticed that some APIs are not supported yet on Edge, as you can see in the screenshot below

Yes that's an issue. Without these APIs any changes using the native bookmarking tools won't be tracked and synced by xbs, meaning those changes will be lost the next time xbs syncs.

And when trying to sync data by sign-in in the extension, this error is thrown. I did a little research and I found that TextEncoder support is in development for Edge. Is there a way to avoid text encoding so the extension can partially work?

Yes, you can use this polyfill. You'll need to run:

npm i text-encoding --save

to add the library to the xbs app package.json, then update the bundlewebextdependencies script to include the required files from the text-encoding folder in node_modules with the build. Once that's been added, it will create the TextEncoder function in Edge but use the native function for browsers that support it.

@ChrisdelaC

This comment has been minimized.

Copy link
Author

commented Aug 10, 2018

Thanks again for your feedback. So, if those APIs are missing, is it possible to replace them with a timer or manual sync? If not, I think going further on this will be a waste of time until Microsoft Edge team include those APIs, even on their roadmap.

@nero120

This comment has been minimized.

Copy link
Member

commented Aug 21, 2018

Sorry I missed your last message, you're absolutely right - until Edge supports the required APIs I wouldn't bother continuing. Let's park this until Microsoft updates Edge to include those APIs.

@Metal-Frog

This comment has been minimized.

Copy link

commented Oct 19, 2018

+1 for an App for Edge

@nero120

This comment has been minimized.

Copy link
Member

commented Nov 6, 2018

Microsoft still have not implemented the required API support in Edge, so I've opened an issue in their GitHub to find out what's going on.

@nero120

This comment has been minimized.

Copy link
Member

commented Jan 21, 2019

@SciFreakholic I don't know if you heard but Microsoft have annouced they are moving Edge to the Chromium code base - maybe it was my unanswered issue that was the final straw for them!

So hopefully once they have a stable build out xBrowserSync should work out of the box... this is Microsoft though! 😆

@ChrisdelaC

This comment has been minimized.

Copy link
Author

commented Jan 21, 2019

Yes, @nero120, I heard about that and is a great news! Thanks for the reminder 😃

@nero120

This comment has been minimized.

Copy link
Member

commented Jun 28, 2019

@SciFreakholic minor update, I've been testing the v1.5.0beta with the Edge Dev Channel release and it works like a dream! The browser is not quite ready for public use yet as I've noticed a few issues, such as the favourites window interface becoming dog slow with a large amount of bookmarks, but thankfully all xBrowserSync functionality works as it is, with only a few minor url-related changes required.

I'm aiming to add support for multiple browsers in v1.6.0, and hopefully Edge will at least be on beta if not public release by then.

@nero120 nero120 added this to the v1.6.0 milestone Jun 28, 2019

@ChrisdelaC

This comment has been minimized.

Copy link
Author

commented Jul 16, 2019

Thanks for the update, @nero120!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.