[Bug 51241] VBScript code to detect a VBScript capable browser doesn't work in Wine's mshtml/vbscript

WineHQ Bugzilla wine-bugs at winehq.org
Wed Jun 9 08:02:33 CDT 2021


https://bugs.winehq.org/show_bug.cgi?id=51241

--- Comment #5 from Jacek Caban <jacek at codeweavers.com> ---
(In reply to Dmitry Timoshkov from comment #0)
> First part of the problem is that 'vb.innerText="Err.Raise";' doesn't set
> the text for HTMLScriptElement and as a result the VBScript code "Err.Raise"
> is not executed. I've fixed this in IHTMLElement_put_innerText() by checking
> the HTMLElement tag, and if it's "SCRIPT" forward the call to
> IHTMLScriptElement_put_text().


We have NodeImplVtbl for such cases, you could add another entry there.

> After that IHTMLScriptElement_put_text() refuses to execute the script
> because it doesn't have a parent node. I've fixed this by removing the check
> for parent node in IHTMLScriptElement_put_text().

We have quite a few tests for that. I'd expect your patch to break them (and,
in any case, extending tests will give us answer how it's supposed to work).

> After that VBScript engine gets actually called to interpret "Err.Raise",
> however it doesn't generate an exception. Note, that "Err.Raise" doesn't
> have the arguments, and according to the tests that's correct behaviour, and
> this leads to VBSE_FUNC_ARITY_MISMATCH (450) being returned by Raise(),
> however even if passed any error code as an argument Raise() doesn't
> generate an exception that could be catched by the JScript code.

Looking at the example, it seems like innerText should somehow propagate the
exception.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list