simulating support for missing web apis?

Is there a way to simulate the lack of support for web apis in Firefox or Chrome?
Like for example, deactivating the push api so I can test if my fallback properly triggers.
I was hoping for a setting in
about:config
or something similar.

For example, I have this line of code:
export const isSupported = ('pushManager' in registration) && ('getSubscription' in registration.pushManager);

In my browser,
isSupported
is always
true
because my browser supports the push api. But I want to test if this variable is actually really
false
when support is missing.
Was this page helpful?