It can work like that but it's very hard. The mutiny team showed it's possible to make a self custodial LN wallet for the browser. But then they stopped because because they think it's too hard of a problem to solve at scale. So I guess their story is evidence for both things: it's technically possible but (arguably) not in a practical way
reply