Skip to content Skip to sidebar Skip to footer

Why The Addone Button Is Lost When I Enable Panel Code?

Once the require('sdk/panel').Panel code is enabled, I cannot find the addone button, even cannot find it in customize page, what's wrong? var buttons = require('sdk/ui/button/act

Solution 1:

The reason is this line :

vardata = require("sdk/panel").data;

but you should write :

data = require("sdk/self").data;

as require("sdk/panel") has no "data", the variable became undefined. Later, when you call data.url("okentry.html"), browser throws exception and Panel constructor and all code below is not executed.

Post a Comment for "Why The Addone Button Is Lost When I Enable Panel Code?"