@mikael I use your WKWebView module (thanks for this marvelous piece of code, as usual) to display an ePub book. In an ePub, each chapter is an html file.
To perform aA-like process to change font-size, I use
wv.add_style('body { column-width:' + w + 'px; min-width:' + w + 'px; column-gap: 9%; height:' + h + 'px; margin-left: 4% ; margin-right: 4% ; margin-top: 4%; margin-bottom: 4%;}')
To know the number of pages of the chapter with this font-size, I need to compute webview.content_size.width divided by webview frame.width.
But I have to be sure that the JavaScript executed by add_style is finished.
My question is: how to be sure it is finished?
Actually, I loop until webview.content_size.width does not change any more but that is not really professional 😀