How to reference a JavaScript file in Lib from an HTML file in Data?
问题 I decided to give Mozilla's Add-on Builder a try. My directory structure looks something like this: The problem is that the file popup.html needs to reference stackapi.js . But I have absolutely no clue how to do that. Looking through the Mozilla docs, there seems to be a way to do the opposite: var data = require("self").data; var url_of_popup = data.url("popup.html"); This allows scripts in Lib to access data files in Data. But I need to do the opposite. 回答1: In add-ons built with the Add