Anvil.server.context.client.type

When I try

"browser" != "background_task"

I get

True

as expected. Am I missing something?