Hi,
There is no reliable way to manipulate the stylesheet before the page is shown since the browser engine will always try to display "something" even before any stylesheet is loaded. UserStyleSheet was planed for injecting custom CSS rules immediately into the frame after it has been created, however it is not implemented in the current build. Even after this is implemented, the styles that actually appears in the page can still override it, which makes this property relatively insignificant. So we are still not sure whether we should implement it or remove it all together.
One way to manipulate style AFTER the page is loaded is to do it through the WebView's JSInitCode property. For example, you can set it something like this:
Code: JavaScript
//Set JSInitCode to the following code. This code is executed
//immediately when a new frame is created. However the code
//merely hook up to the window's onload event and then run
//the code to dynamically inject some style into the page after
//the page has been loaded
window.addEventListener("load",
function()
{
//Create a new div and inject some styles. This DIV is
//appended as the last child element of the body element,
//which give the injected style higher priorities
var div = document.createElement("DIV");
div.innerHTML = "<style> body { font-size: 30px; } </style>";
document.body.appendChild(div);
});
Hope this helps. Please let us know if this works for you.
Thanks!