Search code examples
javascripttvosapple-tvtvjs

Manually setting focus to a <lockup> element in TVJS


I can't find any method in the Documentation to manually set the focus to an element. It is supposed to support the DOM Element class, but when i do

var elem = ele.ownerDocument.getElementById("start");
elem.focus();

it does nothing. elem is correctly set, but it doesn't recognize the focus() method.


Solution

  • Apple's TVJS Framework doesn't provide any method in his classes to manually focus an element.

    Neither in the standard Document Object Module classes it incorporates have any kind of method to directly access the DOM and focus an element.

    The closes thing available is the autoHighlight attribute which allows to focus on render some specific elements in certain positions.