JS interface and code were finally corrected