DOMContentLoadedDelegate
DOMContentLoadedDelegate copied to clipboard
Access `UIWebView` DOM asap
DOMContentLoadedDelegate
Need to evaluate JS on UIWebView safely? Wait until - webViewDidFinishLoad:. But it is too slow if there are many resources (e.g. images) to load. DOMContentLoadedDelegate lets you access DOM as soon as possible.
How to Use
- Add the
DOMContentLoadedDelegaterepository as a submodule of your application’s repository. - Drag and drop
DOMContentLoadedDelegate.xcodeprojinto your application’s Xcode project or workspace. - On the “General” tab of your application target’s settings, add
DOMContentLoadedDelegate.frameworkto the “Embedded Binaries” section.
Set your class confirms to DOMContentLoadedDelegate and do things that required to access DOM in - DOMContentLoaded:.
See a real usage inside Demo folder.
Or, If you would prefer to use Carthage or CocoaPods, please pull request.
About Me
- Twitter: @_cxa
- Apps available in App Store: http://lazyapps.com
- PayPal: xianan.chen+paypal 📧 gmail.com, buy me a cup of coffee if you find it's useful for you.
License
DOMContentLoadedDelegate is released under the MIT license. In short, it's royalty-free but you must keep the copyright notice in your code or software distribution.