make some cpp methods callable from js