I have a unique single-page JavaScript website that retrieves text from a web request in JSON format. The direction of the text (RTL or LTR) is only determined once the response is received. Is there a method to re-render the page after receiving the response? For example, can we dynamically change the CSS files or update the HTML tag for "dir" in order to reapply the styles?