Skip to content

Instantly share code, notes, and snippets.

@wileywimberly
Created August 25, 2011 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wileywimberly/1171553 to your computer and use it in GitHub Desktop.
Save wileywimberly/1171553 to your computer and use it in GitHub Desktop.
stringByEvaluatingJavaScriptFromString: example
NSString *js = @"document.getElementById('output').innerHTML = 'hello from Objective-C';";
NSString *res = [webView stringByEvaluatingJavaScriptFromString:js];
NSLog(@"%@", res);
@gpmilliken
Copy link

Thanks....very straightforward example. -- Ziacles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment