https://bugzilla.wikimedia.org/show_bug.cgi?id=38032

       Web browser: ---
             Bug #: 38032
           Summary: Script error at addStyleTag somewhere in mw-core
           Product: MediaWiki
           Version: 1.20-git
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: blocker
          Priority: Unprioritized
         Component: JavaScript
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified
   Mobile Platform: ---


Complete stack with code. This bug causes UpWiz not to work.

/*JScript global code JScript*/
//////////////////////////////////////////////
mw.loader.implement("mediawiki.page.ready", function () {
    jQuery(document).ready(function ($) {
        if (!('placeholder' in document.createElement('input'))) {
            $('input[placeholder]').placeholder();
        }
        $('.mw-collapsible').makeCollapsible();
        if ($('table.sortable').length) {
            mw.loader.using('jquery.tablesorter', function () {
                $('table.sortable').tablesorter();
            });
        }
        $('input[type=checkbox]:not(.noshiftselect)').checkboxShiftClick();
        mw.util.updateTooltipAccessKeys();
    });;
}, {
    "": ""
}, {});

/*JScript anonymous function JScript*/
//////////////////////////////////////////////
if (allReady(registry[module].dependencies)) {
    execute(module); //         module  "mediawiki.page.ready"  String
}

/*execute JScript*/
//////////////////////////////////////////////
if (typeof style === 'string') {
    addInlineCSS(style); //     style   ""      String

}

/*addInlineCSS JScript*/
//////////////////////////////////////////////
else {
    $newStyle = $(
    addStyleTag(css, getMarker())).data('ResourceLoaderDynamicStyleTag', true);
//      css     ""      String
}


/*addStyleTag JScript*/
//////////////////////////////////////////////
function addStyleTag(text, $nextnode) {
    var s = document.createElement('style');
    s.type = 'text/css';
    s.rel = 'stylesheet';
    if ($nextnode) { //         $nextnode       undefined      
Benutzerdefinierter Typ
        if ($nextnode.nodeType) {
            $nextnode = $($nextnode);
        }
        $nextnode.before(s);
    } else {
        document.getElementsByTagName('head')[0].appendChild(s);
    }
    if (s.styleSheet) {
        // ERROR: Ungültiger Prozeduraufruf oder ungültiges Argument
        s.styleSheet.cssText = text; //         s.styleSheet    {...}   Object
        //      s.styleSheet.cssText    ""      String
        //      text    ""      String

    } else {
        s.appendChild(document.createTextNode(String(text)));
    }
    return s;
}

// No matter what I try to assign to s.styleSheet.cssText, it always throws an
error.
// A lot of RL modules are affected
// In debug mode (&debug=true) the error are ignored but the style is missing

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to