![Firefox logo](https://assets-prod.sumo.prod.webservices.mozgcp.net/media/uploads/products/2020-04-14-08-36-13-8dda6f.png)
Error when using Components.utils.import
Hi ,
I have a web application(CRM) and my clients use it also for the cash register.What I need to do is to create a local file as the cash register's software need's to read from that file in order to print.
Until now i was using this code:
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile); file.initWithPath(filePath);
Unfortunately with the latest version of firefox this isn't working anymore.
What I'm trying now starts like this :
try{ Components.utils.import("resource://gre/modules/FileUtils.jsm"); }catch(e){ alert(e); }
Anyhow, from the beginning I get this error "Component.utils is undefined" .Any suggestions please?
Thank you.
この投稿は cor-el により
すべての返信 (1)
This was also posted on the MozillaZine forum site.