How I can get access to ko.prefs
from window?
My XUL:
<?xml version="1.0"?>
<!-- Copyright (c) 2000-2013 ActiveState Software Inc. -->
<!-- See the file LICENSE.txt for licensing information. -->
<?xml-stylesheet type="text/css" href="chrome://global/skin" ?>
<?xml-stylesheet type="text/css" href="chrome://komodo/skin/" ?>
<?xml-stylesheet type="text/css" href="chrome://komodo/skin/global/global.css" ?>
<?xml-stylesheet type="text/css" href="chrome://komodo/skin/bindings/buttons.css" ?>
<?xml-stylesheet type="text/css" href="chrome://komodo/skin/bindings/widgets.css" ?>
<?xml-stylesheet type="text/css" href="chrome://komodo/skin/bindings/listbox.css" ?>
<?xml-stylesheet type="text/css" href="chrome://komodo/skin/prefs/prefs.css" ?>
<?xml-stylesheet type="text/css" href="chrome://test/content/prefs.css" ?>
<window
class="kodialog"
orient="vertical"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript" src="chrome://test/content/prefs/prefs.js" />
<vbox flex="1" class="autoscroll">
<groupbox orient="vertical" style="padding:10px 4px;">
<caption label="FlatUI"/>
<box>
</box>
<vbox>
<description>
<button onclick="test()">Test it</button>
</description>
</vbox>
</groupbox>
</vbox>
</window>
test():
function test() {
ko.prefs.setBoolean("mytest", true);
}
Error: [ERROR] console-logger: ReferenceError: ko.prefs is not defined (2) in chrome://test/content/prefs/prefs.js:2