-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Onload Event & localStorage #21
Comments
I'm guessing you're creating the Browser object after the onload event has already fired? (i.e. probably in an event handler, rather than in a top-level script?). I'll see if I can find a fix that doesn't break the current API (maybe check to see if the onload event has already fired?). In the mean time, you should be able to work around this using something like:
I'm not totally sure what you mean by "flushing localStorage", please could you give an example? |
Aye, thats pretty much how I worked around the issue. The app I'm using has a pugin frame work that calls an init function when localstorage.clear This removes any data added by dalliance. If the user then reloads the If I don't do this it looks like (I haven't had time to look indepth) the On 18 August 2011 04:11, dasmoth <
|
Since 0.12 there has been no need to explicitly initialize newly created I've not been able to reproduce the issue with localStorage. |
bring uiclient dep from npg_ranger
When Browser javascript function is invoked it adds a listener to the page onload event. For standard alone pages this is okay but for apps where the browser is loaded as a plugin, the page load event may not fire.
Just a suggestion, but it maybe better to leave the invocation of the browser to the caller and not assume which event they may wish to use to trigger the actual rendering of the browser.
On the same topic, if the browser is deployed within a div on a larger page it appears you have to flush localStorage otherwise the browser has a 'fit' if you try to refresh/reload it insitu. ( admittedly some of this behavior may be the result of the application I'm trying to embed the browser)
p.s.
Would like to commend you on a great piece of work !
The text was updated successfully, but these errors were encountered: