Updated javascript bridge to an object model

Signed-off-by: Anders Bech Mellson <mellson@icloud.com>