Skip to content

Author: admin@master

JavaScript get textContent excluding children

First, I’m creating a library for JavaScript and I can not use jQuery. I’m trying to get the text content of an HTML element without the text contents of its children. Both attributes innerText and textContent don’t give me what needed, please help. Answer You can solve using DOM API as chil…

Access iframe variable from parent – undefined

I want to access a variable in iframe from parent index.html. The index.html: The iframe index2.html: In the console, the variable clickParent is “undefined”. How to fix this and make the variable clickParent = clicks? This question is not a duplicate of Sharing global javascript variable of a pag…

WebViewJavascriptBridge on iOS

So I’m creating an app in which there’s a UIWebView which shows a list of locations. My goal is to make it possible that once the user clicks one of the locations, my app can get the lat and longitude of the spot and therefore launch an integrated Navigation SDK. My point is how do I get and pass …