Service workers enable something much closer to drop-in library functionality, but are supported only in new browsers. Checking propagation of that code both in total browser deployment, and with country breakdown would be important to understand when it is sufficiently available to be worth building.