Intercept dialog from <webview> and read the contents -
i use code intercept dialog webview can not see content or interact it:
element webview= queryselector("#webview"); map<string,string> map=new map(); map["src"]=urlwebview+user; webview.attributes.addall(map); queryselector("#webview_cont").style.visibility="visible"; window.addeventlistener("dialog",(event e){ //use window or webview returns same result e.preventdefault(); ... //what should here ?? } ); any solution? thanks
edit
debug:

open issue: https://code.google.com/p/dart/issues/detail?id=23556
the problem lies usage of dart's event class.
it not support extra properties chrome adding event: e.dialog, e.messagetext, e.messagetype.
it not seem there ready solution that, at least not in chrome.dart.
sadly, don't know dart enough give solution. need somehow extend event class, possibly dropping js level.
this library, if abandoned, should give ideas on how (by catching js-level event , stuffing properties in customevent's detail property), though implementing dialogcontroller (which not json-serializable) bit trickier, guess.
Comments
Post a Comment