File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -641,7 +641,7 @@ MathJax.cdnFileVersions = {}; // can be used to specify revisions for indi
641
641
if ( document . styleSheets && document . styleSheets . length > sheets )
642
642
{ sheets = document . styleSheets . length }
643
643
if ( ! head ) {
644
- head = ( document . getElementsByTagName ( "head" ) ) [ 0 ] ;
644
+ head = document . head || ( ( document . getElementsByTagName ( "head" ) ) [ 0 ] ) ;
645
645
if ( ! head ) { head = document . body }
646
646
}
647
647
return head ;
@@ -3041,6 +3041,8 @@ MathJax.Hub.Startup = {
3041
3041
var HEAD = document . getElementsByTagName ( "head" ) [ 0 ] ;
3042
3042
if ( ! HEAD ) { HEAD = document . childNodes [ 0 ] } ;
3043
3043
var scripts = ( document . documentElement || document ) . getElementsByTagName ( "script" ) ;
3044
+ if ( scripts . length === 0 && HEAD . namespaceURI )
3045
+ scripts = document . getElementsByTagNameNS ( HEAD . namespaceURI , "script" ) ;
3044
3046
var namePattern = new RegExp ( "(^|/)" + BASENAME + "\\.js(\\?.*)?$" ) ;
3045
3047
for ( var i = scripts . length - 1 ; i >= 0 ; i -- ) {
3046
3048
if ( ( scripts [ i ] . src || "" ) . match ( namePattern ) ) {
You can’t perform that action at this time.
0 commit comments