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:

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

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -