Web polyfill

Not all browsers support window.ai and window.translation, so when AiBrow is installed and those APIs are unavailable it automatically polyfills these fields. The API should provide the same level of compatibility as the native built-in APIs and the user will be guided to complete the extension install at use.

If you want to check if the APIs have been polyfilled, you can check the aibrow property on each:

window.ai?.aibrow === true // aibrow has polyfilled window.ai
window.translation?.aibrow === true // aibrow has polyfilled window.translation

Last updated