Community
Participate
Working Groups
Overview: JS validator produces message "The local variable inner_callback may not have been initialized" on this code snippet: Element.addMethods({ observeOnce: function(element, event_name, outer_callback) { var inner_callback = function() { outer_callback.apply(this, arguments); Element.stopObserving(element, event_name, inner_callback); }; Element.observe(element, event_name, inner_callback); } }); Actual Results: Warning on line: Element.stopObserving(element, event_name, inner_callback); Expected Results: No warnings. Variable is initialized. Build Date & Platform: Eclipse Java EE IDE for Web Developers. Version: Indigo Release Build id: 20110615-0604
Still not fixed in WTP 3.4.0 (tested on Eclipse SDK Version: 3.8.0 Build id: M20120626-2030). Shorter example: function f1() { var closing = setInterval(function() { clearInterval(closing); }, 30); }
It works in Eclipse Java EE IDE for Web Developers. Version: Mars Milestone 5 (4.5.0M5) Build id: 20150205-1617