Implement DLL in Javascript