While setting $wgMimeType to application/xhtml+xml to enforce XHTML
well-formedness for testing, I noticed that there seem to be some regressions
where JavaScript behavior doesn't work correctly:
- wgBreakFrames check on all page views
- mwEditButtons when building toolbar in edit view
Found this to happen in following browsers:
- Firefox 2.0, Mac and Windows
- Firefox 1.5, Mac
- Opera 9, Mac
The variables, defined respectively inline in a <script> element and in
wikibits.js, don't appear to be visible in the subroutines that use them.
'Undefined variable' or 'has no properties' errors result.
Opera's error messages:
name: ReferenceError
message: Statement on line 51: Reference to undefined variable: wgBreakFrames
Backtrace:
Line 51 of linked script http://katitzi.local/trunk/skins/common/wikibits.js?33 if (wgBreakFrames)
name: TypeError
message: Statement on line 341: Could not convert undefined or null to object
Backtrace:
Line 341 of linked script http://katitzi.local/trunk/skins/common/wikibits.js?33 mwEditButtons[mwEditButtons.length] = {imageFile : imageFile, speedTip :
speedTip, tagOpen : tagOpen, tagClose : tagClose, sampleText : sampleText};
Line 3 of inline#1 script in
http://katitzi.local/trunk/index.php?title=Main_Page&action=edit
addButton("/trunk/skins/common/images/button_bold.png", "Bold text", "'''",
"'''", "Bold text");
Offhand I don't see anything wrong with the code; it seems correct to me and as
far as I know should work fine in XHTML mode just as it does in HTML 4 mode
(text/html mime-type).
Removing the 'var' on the declaration in wikibits.js does not appear to have any
effect for mwEditButtons.
Version: 1.9.x
Severity: normal