embed function updated to javascript code
Merge branch 'master' into OAS-dev