Note that there are some explanatory texts on larger screens.

plurals
  1. POChildBrowser crashes when targeting all HREF tags in a class
    primarykey
    data
    text
    <p>I have been using ChildBrowser happily on my code with no issues through the following function:</p> <pre><code>var app = { ready: false, initialize: function() { this.bind(); }, bind: function() { document.addEventListener('deviceready', this.deviceready, false); }, deviceready: function() { app.report('deviceready'); app.report('Installing child browser'); app.ready = true; //ChildBorwser init cb = ChildBrowser.install(); }, report: function(id) { console.log("report:" + id); } }; var layout = { showUrl: function(url) { if(app.ready == true){ window.plugins.childBrowser.showWebPage(url); event.preventDefault(); event.stopImmediatePropagation(); return false; } else { document.location.href = url; return false; } }, } </code></pre> <p>But I get an Xcode error when I try to call the function outside of my javascript 'layout' object, like this:</p> <pre><code>$('.text a').on('click', function(e) { e.preventDefault(); var thisUrl = $('.text a').attr('href'); layout.showUrl(thisUrl); }); </code></pre> <p>The Xcode error that I get in both simulator and device is:</p> <p><strong>* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present modally an active controller .' *</strong> First throw call stack: (0x167012 0x25a0e7e 0x48b721 0x48c777 0x48c7b7 0x35fd 0x6d914 0x6d147 0x6cd2d 0x6ce96 0x6cdd3 0x25b46b0 0x113c035 0xeaf3f 0xea96f 0x10d734 0x10cf44 0x10ce1b 0x33d17e3 0x33d1668 0x3a265c 0x283c 0x2795) libc++abi.dylib: terminate called throwing an exception.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload