i have a webpage with javascript that split the view into “pages” visible to the user:
<!-- optionally include helper plugins -->
<script type="text/javascript" language="javascript" src="js/jquery.mousewheel.min.js"></script>
<script type="text/javascript" language="javascript" src="js/jquery.touchSwipe.min.js"></script>
<script type="text/javascript" language="javascript" src="js/jquery.ba-throttle-debounce.min.js"></script>
i’m wondering if the app can know the page that is displayed…accessing some variables in the page or some other method to know it.
i’ve not programmed the page, so i’m asking only if is conceptually possible or not, and what is a way to know what is happening to the page, driven by an event in the webpage
thanks
I am not sure of any direct way of doing this. Using some app specific custom url scheme is one wat. This answer comes close to answering your question – send a notification from javascript in UIWebView to ObjectiveC
I have also read somewhere about writing to
NSLogfrom your javascript code, then iterate through that log and extract the commands and variables to be used by your Objective-C code. Never tried it.