Search code examples
samsung-smart-tv

samsung smart TV IME initialization issue


While initializing the IME object in samsung tv I am getting the following error:

TypeError: 'undefined' is not a function (evaluating 'widgetAPI.registIMEKey()')

The widgetAPI is properly initialized and accessible.

Any kind of help is appreciated.

Code I tried:

var textBoxController = {
        createInputbox: function (elId){
            var Elmement = $("#"+elId);
            var imeReady = function(imeObject)
            {
                 alert("----------R E A D Y-----------");
                    var ready = true;
                    if (ready)
                    {
                        $("#"+elId).focus();
                    }
            };
            var ime = new IMEShell(elId, imeReady, 'en');
            widgetAPI.registIMEKey();
        },

        test:function(){
            this.createInputbox("txtName");
        }
}

Solution

  • Where does widgetAPI come from ?

    Your code should be:

    var ime = new IMEShell(elId, imeReady, 'en');
    ime.registIMEKey();