html - How can I access Javascript from Dialog page in Google Developer Console? -


on chrome, know how allow google developer console access javascript file linked html page requested dialog page? in website, javascript files accessed window contains html page, when open dialog box through jquery request html page, linked javascript file won't come in console.

here's how launch dialog box html (link) embedded:

function load_dialog(link, title, width, height){  //take care of options first. var options = {      autoopen: true,     position: "top",     closeonescape: true,     title: title,     width: width,     height: height,     modal: true,     resizable: false,     show: {effect:"fade", duration:500},     close: function (event, ui){         dialog_box.dialog("destroy").remove();     } };  //launch dialog. var dialog_box = $("<div></div>").load(link).dialog(options); return false; 

}

i should add possible see javascript linked html when open dialog box through new window.

thanks in advance!

i curious question because asked myself same one. hope mean don't see in sources tab because andyb said appears in network tab there's no chance debug dynamically added file.

after googling stumbled upon stackoverflow thread asking similar question.

here came with:

if want set breakpoint add debugger; in line want have it. if whole file should listed in sources tab can add

//@ sourceurl=myfile.js //or  //@ sourceurl=path/to/js/myfile.js 

at end of file load.

i found chrome developer tools docs entry describes have do. unfortunately demo broken (errors appear in console)


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -