Object.defineProperty lets us use `api.online` as a non-function field, but we can still attach behavior to state changes. Basically, we avoid having separate `isOnline()` and `setOnline(bool)` methods.