How does revBrowserAddJavaScriptHandler actually work?
Posted: Tue Jul 07, 2015 9:41 am
Hi guys, bit of an odd one here I think.
So, a little bit of context, I've got revBrowserAddJavaScriptHandler to work with a simple html document I've created, and I'm now trying to integrate it with an existing webpage that's much more complex.
The issue I'm having currently is pretty simple- adding any handler and calling it from the JS doesn't trigger any handlers in LiveCode itself. I've been thinking about this (read as: banging head on wall) for the better part of a day now, and I have a feeling it's due to the webpage rather than LiveCode itself. The webpage is built on the Zend framework and is based around MVC.
What I imagine is happening (although I'm completely speculating here, feel free to tell me I'm wrong) is one of two things. Either the LiveCode browser inserts a JS script into each page it visits, or it traps any errors referencing the liveCode.myHandler that it finds. I'm leaning towards the first one, as that's making me think that LiveCode can't insert the script into the HTML document because of some of the funky MVC stuff going on.
Anyway, any thoughts or ideas? I'm very aware that I've just written this out, and I'll probably find a stupid spelling mistake in the code in a minute...
So, a little bit of context, I've got revBrowserAddJavaScriptHandler to work with a simple html document I've created, and I'm now trying to integrate it with an existing webpage that's much more complex.
The issue I'm having currently is pretty simple- adding any handler and calling it from the JS doesn't trigger any handlers in LiveCode itself. I've been thinking about this (read as: banging head on wall) for the better part of a day now, and I have a feeling it's due to the webpage rather than LiveCode itself. The webpage is built on the Zend framework and is based around MVC.
What I imagine is happening (although I'm completely speculating here, feel free to tell me I'm wrong) is one of two things. Either the LiveCode browser inserts a JS script into each page it visits, or it traps any errors referencing the liveCode.myHandler that it finds. I'm leaning towards the first one, as that's making me think that LiveCode can't insert the script into the HTML document because of some of the funky MVC stuff going on.
Anyway, any thoughts or ideas? I'm very aware that I've just written this out, and I'll probably find a stupid spelling mistake in the code in a minute...