I know I can use M-x browse-url-of-buffer to create a temp file and render it on my default browser. But how could I render it with eww?

I tried the function suggested here, but I get the error message that says:

eww-display-html: Buffer nil doesn’t exist

The use case is the following:

  1. Export org as HTML (to a temp buffer);
  2. Render the HTML to a browser, my default browser or eww.

Any suggestions?