[Bug 51241] VBScript code to detect a VBScript capable browser doesn't work in Wine's mshtml/vbscript
"WineHQ Bugzilla" <[email protected]> Wed, 09 Jun 2021 13:02:33 +0000
| Newsgroups | gmane.comp.emulators.wine.bugs |
|---|---|
| Message-ID | <[email protected]/> |
https://bugs.winehq.org/show_bug.cgi?id=51241 --- Comment #5 from Jacek Caban <[email protected]> --- (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.