Questions about PM extension parity, development and documentation
Posted: 2018-08-22, 18:24
My first post, so here's the requisite big thank you for all the effort you put into this lovely browser, a safe haven from the benighted tracking-filled, WebExt-using competition.
I'm a beginner when it comes to programming, and partly as a way to learn more, I have been researching for a little while how to edit and eventually create extensions, especially now that PM has a near monopoly on the legacy ones. I sought all the reference I could it wasn't what I expected. Unfortunately, while Mozilla's documentation for WebExt is neatly collected, the docs for legacy extensions are a planecrash on a trainwreck. It's spread over several sites, it's not properly linked or categorized and it's full of gaps. PM's docs are, well, just plain not there. So I figured I'd have to delve into PM's source code. Oh well. But I'd like to ask a few questions first.
Since the stable version 28 just hit and it seems to include a lot of changes to the JS and DOM APIs as well as to the devtools, I figured this is the perfect time to ask a few things that I haven't been able to find an answer to in these forums nor elsewhere. Excuse me beforehand if I demonstrate too much ignorance here.
Thanks for your time.
I'm a beginner when it comes to programming, and partly as a way to learn more, I have been researching for a little while how to edit and eventually create extensions, especially now that PM has a near monopoly on the legacy ones. I sought all the reference I could it wasn't what I expected. Unfortunately, while Mozilla's documentation for WebExt is neatly collected, the docs for legacy extensions are a planecrash on a trainwreck. It's spread over several sites, it's not properly linked or categorized and it's full of gaps. PM's docs are, well, just plain not there. So I figured I'd have to delve into PM's source code. Oh well. But I'd like to ask a few questions first.
Since the stable version 28 just hit and it seems to include a lot of changes to the JS and DOM APIs as well as to the devtools, I figured this is the perfect time to ask a few things that I haven't been able to find an answer to in these forums nor elsewhere. Excuse me beforehand if I demonstrate too much ignorance here.
- The most important is probably how PM's extension support matches up to FF's. While I'm well-aware that PM has changed way past the point it can be called a mere fork, this is an area where they can be compared. The problem is, I have found conflicting information. PM 27 itself identified as FF 27 to AMO so I figured that was the parity, yet I have seen posts here saying that PM can run extensions aimed up until FF 32 or even 52. I figure PM 27 or 28 extension codes aren't an exact match with those of any FF version, but if possible I'd like to know, which is the latest FF version whose full extension APIs are all included in PM 28? Or at least, the closest FF version, I suppose.
- It was my hope that somewhere out there, an IDE or text editor had managed to compile all l/g/d to make up for Mozilla's messy docs, but no dice. The best things I found were VSCode and WebStorm, which can use DefinitelyTyped library/grammar/dictionary (it seems everyone uses a different term) for JS, HTML, DOM and CSS as well as several Web APIs but these seem incomplete; after those there's Sublime which has all those minus Web APIs plus XUL but all in its own l/g/d format, or it can use DefinitelyTyped; and finally there's Komodo, which has all previous minus Web APIs plus XPCOM but again they're all in its own format or it too can use DefinitelyTyped. I found nothing on FUEL, Mozilla's JSM modules and most of its the many, many Web APIs. Incidentally, DefinitelyTyped also has the SDK and WebExt APIs which Debugger for Firefox uses, but these don't interest us. Unless I'm mistaken, I listed all of the APIs available to legacy extensions devs, am I correct? If not, what am I missing?
- Continuing from the previous item, it's important to note is that I didn't manage to get any of the 4 softwares I listed to have all code intel features I mentioned above, but then again, I am a novice. Is it possible or am I asking for too much?
- Regardless, it seems that, even if I got any IDE or text editor to have perfect code intel for the existing l/g/d, there would still be a need to make l/g/d for FUEL, JSM modules and most Web APIs. I presume this would require diving into PM's code. From what I (think I) learned, it would be possible to generate a skeleton documentation for all of PM's Javascript APIs by parsing the IDL and WEBIDL files and certain JSM files in order to obtain the entire PM JS l/g/d, plus whichever little information they might have in the way of commented-out text. Is this right? Also I've seen AIDL files but these seem exclusive to Android and WIDL and WIDLPROCXML which are related to tests, so these don't count, I guess.
- I have looked into several IDEs and expansible text editors and didn't find anything specifically aimed at FF legacy extension devs, preferably one that doesn't include code intel for FF's/PM's internal code, which extension devs can't use. My definition of code intel would be: code completion; symbol navigation ("go to definition", "list all references" etc.); indexing the users code and adding it to the workspace's l/g/d; type inference; and lastly, calltips or links to web docs. I unfortunately managed to find no IDE or text editor that could satisfy all these requirements. The aforementioned VSCode has an extension called Debugger for Firefox which supports all types of FF extensions -- overlay, bootstrapped, SDK and WebExt -- in addition to allowing debugging of web apps, but it does nothing for code intel. Is there some setup recommended for PM extension devs?
Thanks for your time.