Komodo 9 introduces the
You can find available modules here: https://github.com/Komodo/KomodoEdit/tree/master/src/chrome/komodo/content/sdk
var logging = require("ko/logging");
For example you can get the language of the current file:
var language = require("ko/editor").getLanguage();
Add-ons can define their own require names by adding a special require-path xpcom category entry into their chrome.manifest file:
and then they make use of their JS modules like so:
category require-path commando chrome://commando/content/js/
which would map to the chrome://commando/content/js/project.js file.
var proj = require("commando/project");
Komodo's require functionality is built on top of the Mozilla Addon SDK, so nearly all of the APIs defined there can be used inside of Komodo. I say nearly, as some things are obviously different (e.g. the Firefox browser has web page tabs).
© 2017 ActiveState Software Inc. All rights reserved. ActiveState®,
Komodo®, ActivePerl®, ActivePython®, and ActiveTcl® are registered
trademarks of ActiveState.
All other marks are property of their respective owners.