Add a deprecation message to File.getContentsFromURL

This commit is contained in:
Adomas Venčkauskas 2018-08-23 15:59:08 +03:00
parent 377f8d0aa8
commit d447403f86

View file

@ -331,8 +331,10 @@ Zotero.File = new function(){
* Return the contents of a URL as a string
*
* Runs synchronously, so should only be run on local (e.g. chrome) URLs
* @deprecated
*/
function getContentsFromURL(url) {
Zotero.debug('File.getContentsFromURL() is deprecated. Use File.getContentsFromURLAsync()');
var xmlhttp = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"]
.createInstance();
xmlhttp.open('GET', url, false);