Change visibility of Readability::loadHtml() and prevent DOM reset in init() - #113
Conversation
|
I think this should be fine. Nobody should be re-initing (re-executing really) a Do we know why it was moved in 66215a6? Could we perhaps just move it back? Though that might be a larger BC break than this. Or alternately, move the HTML loading into a separate class and use it here and in |
Sadly, can't remember.. |
Yeah, moving back I wonder if we shouldn't just go ahead and prevent |
|
The changes view is a bit cluttered by the move of the |
|
Good move 👍🏼 |
This change is required for usecases where we want to load the DOM without going through the whole init() process Related to j0k3r/graby#392 Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Letting init() resetting the DOM may lead to unexpected behaviors in libraries like Graby. Related to j0k3r/graby#392 Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
These changes are required for j0k3r/graby#392
@j0k3r @jtojnar commit 8f8fb2c introduces a slightly changed behavior on
init().With this PR, calling twice
init()does not reset $dom anymore.I don't know if you want to consider this as a breaking change.