Your approach would only work if you had a web library. In the example i pasted it is trying to use a bundled one Making apps that wholly depend on internet access is gonna bite you in the butt, especially if all you want is to use a webview like a component.
If you depend on web access anyway your approach is pretty elegant.