3 ms·
> It's an interesting idea but the notion of using a selector syntax as a creation syntax seems to break down rather quickly. It's also unfriendly to (partiall
by masklinn 15y ago
> It's an interesting idea but the notion of using a selector syntax as a creation syntax seems to break down rather quickly.
It's also unfriendly to (partially) generated or separately-configured names, leading to some kind of weird positional-only substitution system.
> Also, the syntax to remove something is truly bizarre; you put() the negation.
Not to mention it's not the actual negation: you add the class 'foo' with `.foo` but you remove it with `!foo` instead of `!.foo` (or even better, the perfectly standard `:not` negation pseudo-class: why not remove `.foo` with `:not(.foo)`?). This leads to a non-generic removal syntax: attribute removal has a different one (you negate the attribute name within the brackets), and ids apparently are not removable (via the #-syntax selector).
Neither can you remove a child from a parent I guess, not without getting a handle to the child element itself and writing `put(elementToDelete, "!");`.