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

Make generated project fully compatible with Edge #20

Closed
JimMorrison723 opened this issue Jun 15, 2018 · 5 comments
Closed

Make generated project fully compatible with Edge #20

JimMorrison723 opened this issue Jun 15, 2018 · 5 comments
Assignees
Labels
question Further information is requested

Comments

@JimMorrison723
Copy link

Expected Behavior

Full Edge support out-of-the-box.

Current Behavior

After generating extension, we have to manually add author field to manifest.json and persistent property to the background page object.

Also, Edge doesn't support promises (yet), maybe use this polyfill version?

Steps to Reproduce (for bugs)

  1. generate extension
  2. run it
  3. try to load it into Edge

Suggestion

1., Add persistent to manifest file by default (if we select to add background page), like this:

"background": {
    "scripts": [
        "scripts/background.js"
    ],
    "__chrome|edge|opera__persistent": false
},

Documentation
Browser compatibility (not supported in firefox)

2., Simply add author property to default manifest.json

Documentation (This key is mandatory in Microsoft Edge.)

3., Polyfill to Edge version
If i simply add the polyfill, browser will be undefined. I assume using this fixes the issue. Needs testing.

Documentation (Microsoft Edge extension APIs use callbacks, not promises.)

Your Environment

Tech Version
generator-webextension 0.0.5
node v10.4.0
OS W10
browser
etc
@balcsida balcsida self-assigned this Jul 1, 2018
@balcsida
Copy link
Member

balcsida commented Jul 5, 2018

So, I wrote a task list (because I like task lists):

  • Add persistent to manifest file by default (if we select to add background page)
  • Simply add author property to default manifest.json
  • Polyfill to Edge version

The first two item looks like an easy win to me. But the last one...
It definitely needs some additional investigation and test.

@balcsida
Copy link
Member

balcsida commented Aug 6, 2018

For the last task, I will follow mozilla/webextension-polyfill#154 as well

@balcsida
Copy link
Member

balcsida commented Sep 9, 2018

Depends on mozilla/webextension-polyfill#114

@balcsida
Copy link
Member

Hi @JimMorrison723,

Because Edge will switch Chromium base, I closed this Issue and PR #26.

For further explanation, please see rpl's comment here:
mozilla/webextension-polyfill#114 (comment)

Kind regards,
@balcsida

@JimMorrison723
Copy link
Author

Hi @balcsida!
Yeah, when i heard about the switch, i was happy that we don't need this after all. Good thing we waited... =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants