Closed Zoramite closed 1 year ago
Think it's safe to make this change? Is it needed with the submission of https://github.com/blinkk/amagaki/commit/85db1a54d7fd9d094083afc9640303ab409c8070
It is needed because the logic for the afterRender
hook is that you can change the contents after the render, this should have been sync because you want to be able to chain plugins together to have them modify things after the previous plugin is done changing it.
For example, if you have one plugin that prettifies the html and another that replaces all occurances of foo
with bar
, if they are done async you technically might run one before the other in an inconsistent manner or overwrite the changes that the other plugin performed.
Updates the afterRender hook to not be async since it needs to use the results of the previous plugin to make the next set of changes.