-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Example showing how to use ES6/7 code transpilation #97
Comments
There could be some useful tools / examples to check out here: https://github.com/vitalets/awesome-browser-extensions-and-apps |
Here is an example of how to set up webpack: https://github.com/mdn/webextensions-examples/tree/master/webpack-modules |
A great (small?) start would be an eslint config file for this repo that matches what's supported of ES6/7 now in Firefox (at least). It would add some "enforcement" on code quality too...which is probably not a bad thing. 😉 👍 for this! |
@BigBlueHat good idea! That would be an easier example to create so I filed separately for it: #117 |
Aha, I created this example but forgot I had filed a bug about it! #155 |
how do I import functions from one js script in my extension to another ? Tried import but that doesn't seem to work, and even breaks the background menu from displaying. This seems like a common enough construction that it should be documented. |
@rebloor I know this one is closed, but fancy investigating @wesinator 's request? |
All ES6/import examples have been removed and I explained why this was unhelpful in #398 (comment) . I hope that someone can reconsider that decision. |
@chrisdavidmills I will add it to my backlog, and give it some consideration when I get the non urgent stuff. |
it sounds like I may be looking for
(Trying to call function |
https://stackoverflow.com/questions/59971909/how-to-call-load-function-from-separate-script-file-within-mozilla-webextension/60244276#60244276 is the answer I was looking for |
@wesinator thanks for the update, I've created 2827 to investigate how we might improve the documentation. |
Many developers who are new to WebExtensions will be used to the modern conveniences of building JavaScript web applications in EcmaScript 6, 7, and higher. I would like to see an example that shows how to construct a WebExtension using these JavaScript features. Here are some nice things to demonstrate in an example:
This example would serve as a guide for developers who would like to write a WebExtension in newer JavaScript syntax.
Building this example may also reveal shortcomings in the platform or tools (like web-ext). Please file bugs!
The text was updated successfully, but these errors were encountered: