addTargetWithActionForControlEvent works on TestJavascript but doesn't work on my code

I have this code

@
var backgroundButton = cc.Scale9Sprite.create(Images.menubutton.src);
var titleButton = cc.LabelTTF.create(“Touch Me!”, “Arial”, 30);
titleButton.setColor(cc.c3b(159, 168, 176));

var loginButton = cc.ControlButton.create(titleButton, backgroundButton);
loginButton.setPosition(cc.p(100,100));
this.addChild(loginButton);
@

This works fine on cocos2d-html5 and cocos2d-js

When I try to set up the button action
@
loginButton.addTargetWithActionForControlEvent(this, this.doAction, cc.CONTROL_EVENT_TOUCH_DOWN);
@

On cocos2d-html5 works fine, but on cocos2d-js the emulator throws this exception
@
Cocos2d: JS: TypeError: loginButton.addTargetWithActionForControlEvent is not a function
@

What I’m doing wrong?

I launch the TestJavascript demo from cocos2d-x and this works fine. Maybe I’m missing a flag or include on the xcode project?

I’m using cocos2d-x/html5 2.1.3

Well, it’s an issue.

https://github.com/cocos2d/cocos2d-x/issues/2353

Supported in 3.0, please refer to https://github.com/cocos2d/cocos2d-x/pull/3403 and https://github.com/cocos2d/cocos2d-x/pull/3413
Please clone codes from github for testing.
You could find it in Testjavascript/ExtensionTest/CocosBuilderTest or ControlButtonTest.