Optimize use of external interface to inject the js code only once.