"Krinkle" posted a comment on MediaWiki.r99446.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/99446#c26722

Commit summary for MediaWiki.r99446:

ensure tests for mw.Uri work in non-browser environments

Krinkle's comment:

<pre>
-       mw.Uri = mw.UriRelative( document.location.href );
+       // if we are running in a browser, inject the current document 
location, for relative URLs
+       if ( document && document.location && document.location.href ) { 
+               mw.Uri = mw.UriRelative( document.location.href );
+       }
</pre>

This means when ran in certain environments, loading the mediawiki.Uri module 
does not result in mw.Uri being defined.

That's a bit odd ? Perhaps it's the environments responsibility to provide a 
mock window.document, or we could let it fallback to an example inside the 
module.

Thoughts ?

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to