Add JavaScript interface code