add javascript interface to use plugin