You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to be able to add some CSS to the page easily.
I was using the Rust bindings briefly and there was a inject_css() function supplied. I have written a similar function for dlang which calls webview_eval() to run some JS which adds a <script> tag to the head of the document. I've stuck it in copy of package.d for now.
One problem I am having is that the document is not fully loaded when I call inject_css() and the JS ca fail. It is not clear to me how to block, or is there a way of getting a callback when the document has finished loading.
I can of course setup an onload() in the body tag but I'd rather set the callback in the webview API if possible rather that messing around with yet more JS. I feel that this functionality should be available out-of-the-box.
Thoughts/help appreciated.
The text was updated successfully, but these errors were encountered:
It would be nice to be able to add some CSS to the page easily.
I was using the Rust bindings briefly and there was a inject_css() function supplied. I have written a similar function for dlang which calls webview_eval() to run some JS which adds a <script> tag to the head of the document. I've stuck it in copy of package.d for now.
One problem I am having is that the document is not fully loaded when I call inject_css() and the JS ca fail. It is not clear to me how to block, or is there a way of getting a callback when the document has finished loading.
I can of course setup an onload() in the body tag but I'd rather set the callback in the webview API if possible rather that messing around with yet more JS. I feel that this functionality should be available out-of-the-box.
Thoughts/help appreciated.
The text was updated successfully, but these errors were encountered: