added support for JavaScript interface