Some of the classes and method in the gadget.* namespace are feature-specific. To use them you must include a <Require feature="foo"/> element in your <ModulePrefs>.
gadget.*
<Require feature="foo"/>
<ModulePrefs>