Open jtojnar opened 1 year ago
@jtojnar could you elaborate on 4th and 6th items?
Sure. I am not sure how feasible these are, though.
Decouple Readability (stateless worker object) from result
I was thinking something like making Readability
a factory for an immutable ReadableArticle
data object. That way it should be harder to have internally inconsistent state like in https://github.com/j0k3r/graby/pull/307
Drop JSLikeHTMLElement in favour of static functions
registerNodeClass
is hard to make work with static analysis – we could just create getInnerHtml(DOMElement): string
function and use that instead ->innerHTML
magic property.
Some BC breaking suggestions: