0

I'm wondering if there is a way to use :stringByEvaluatingJavaScriptFromString to fetch a specific css attribute from an element.

For instance, say I want to validate a background image and the css specifies background-image: blue.png. I'm having trouble getting :stringByEvaluatingJavaScriptFromString to do anything other than the basic innerHTML example.

document.getElementById or document.getElementsByClassName yield an empty array.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
tuggles
  • 21
  • 4
  • Are there iframes involved? If so, this gist might help point you in the right direction. https://gist.github.com/jmoody/53276aa979c9cdc6a136 – jmoody Jul 01 '14 at 01:09
  • There are no iframes involved, it is a hybrid application created in Worklight. My solution was to chat with the developers and take another route in identifying the correct image. :) – tuggles Jul 02 '14 at 14:07
  • @tuggles, please write the answer to this question, since you have it now. Or, remove the question. – Idan Adar Sep 25 '14 at 11:32

0 Answers0