Inject JS to find Display or Visibility of element on webpage

the returned uielement (variable box in your case) wil be assigned to invoke js target property element (refering to screenshot: here it is similar uiElement)
grafik

I would suggest to implement the javascript method signature not with changed name and implementing it with Function(element, input){—}

input configured as described above