Add 'getInteractiveState' to the post message API and use it

[#43328491]