native javascript api extend