Page MenuHomePhabricator

mw.util.wikiGetlink should accept URL parameters in its second parameter
Closed, DuplicatePublic

Description

From
[[mw:Thread:Talk:ResourceLoader/JavaScript Deprecations/importScript(), importStylesheet()]]
https://www.mediawiki.org/wiki/Topic:Qgo3q6e0hvae1dpj

I would love it if mw.util.wikiGetlink() would accept an additional, optional parameter of type "object" that would add parameters: so if i want to get a page with "?action=edit", i would use mw.util.wikiGetlink(pageName, {action: 'edit'}); etc. if the first parameter is an object, this means i want the current page (just like mw.util.wikiGetlink() with no parameters), but still append the parameters.
this would be in the spirit of most or all of jQuery, calls, and very much in synch with the way to do ajax in jquery.

Details

Reference
bz34743