Thanks. I tried modifying it a bit to open my html file from my assets, and it does mostly work, but it seems to parse some of the line-breaks as text:
My code:
def button_1_click(self, **event_args):
url = anvil.server.get_app_origin() + “/_/theme/component.html”
file_contents = URLMedia(url).get_bytes()
self.html_component.html = file_contents
I also did it using an iFrame instead, however it seems not to load the CSS file when it is displayed in an iFrame. Maybe the reference to the CSS file in the assets changes when an HTML file in assets is displayed in an iFrame?