add `postMessage` to improve performance
add API