7

I am working on Firefox Addon development, I have successfully built the addon, but it is giving me validation error on submission as "Warning: Your add-on uses an interface which bypasses the high-level protections of the add-on SDK. This interface should be avoided, and its use may significantly complicate your review process." on these lines.

const { Cc, Ci } = require("chrome"),
nsIIOService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService),
nsIStyleSheetService = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService);

I am able run the addon on my machine, but couldn't submit due to this flagged validation check.

Is there any alternative way?

2 Answers2

0

It is completely acceptable to use that. There is not alternative to some APIs in the SDK. That validation is a warning because those features are not frozen and can change at anytime. Can you post a screenshot of the validation blocking your submission? It should be allowed through.

Noitidart
  • 35,443
  • 37
  • 154
  • 323
  • 1
    Though it is allowed, my addon wont be granted a full review! –  Mar 28 '16 at 07:25
  • That's real odd. Can you please share a screenshot, or the email message the reviewer shared with you. Did a reviewer reject your addon? – Noitidart Mar 28 '16 at 13:38
  • Addon was preliminary reviewed. Reviewer's comment - 1) Add-on must unregister/disconnect observers, remove listeners, clearInterval (for setInterval), revert all built-in preferences which add-on changes, and remove its own imported modules (not imported Firefox modules), unregisterSheet; on 'disable' or 'uninstall'. –  Mar 29 '16 at 05:59
0

While not entirely identical in function to nsIStyleSheetService, sdk addons can use page-mod to inject stylesheets into some or all content pages.

the8472
  • 40,999
  • 5
  • 70
  • 122