Why not just rename this to `text_content` and make this take `Option<PseudoElement>`? If `None` then it returns the real element's content. Then you can remove most of the special-cased handling for pseudo-elements in `construct.rs`.