Hacker News new | ask | show | jobs
by transfire 473 days ago
Between this and other changes I worry they are just throwing more and more stuff at the wall to widen their browser moat.

Is command and commandfor actually a good idea? I understand the point of it, but it seems like yet another layer of cognitive load.

Instead why not just apply the same principle to CSS? If I could make a CSS selector for one element but have the result target other elements, then one could achieve the same results and more. It would require only a few more pseudo-selectors. And while it probably isn’t necessary, I think it might be prudent to mark the properties that undergo state changes. Something like:

    #my-popover { display:= none; }
    #my-button:click {
      |> #my-popover {
        display:= block;
      }
    }
Where `|>` retargets and the `=` indicates the property can undergo state changes. (Maybe the syntax could be better, but you get the idea.)