A WebView initialized with -[WebView(WebPrivate) initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:] should allow script evaluation, excluding script embedded in markup. Patch forthcoming.
Created attachment 306830 [details] Enable non-markup scripting
We should really try to get rid of "simple" HTML documents. Does it serve a performance purpose still?
Committed <https://trac.webkit.org/r215240>.