While trying to use browser.runtime.sendmessage(object) function above error occurs. Runtime API is not available and I see that web runtime API is available on
browser.runtime.sendmessage(object)