mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-08 23:44:12 +01:00
Minor compat changes.
--HG-- extra : rebase_source : d40d66e2cd689f43243a837dbd19fe5e0ec8d462
This commit is contained in:
@@ -2428,12 +2428,14 @@ var Buffer = Module("Buffer", {
|
||||
return val;
|
||||
|
||||
// Stolen from browser.jar/content/browser/browser.js, more or less.
|
||||
try {
|
||||
buffer.docShell.QueryInterface(Ci.nsIDocCharset).charset = val;
|
||||
window.PlacesUtils.history.setCharsetForURI(buffer.uri, val);
|
||||
buffer.docShell.reload(Ci.nsIWebNavigation.LOAD_FLAGS_CHARSET_CHANGE);
|
||||
}
|
||||
catch (e) { dactyl.reportError(e); }
|
||||
Task.spawn(function () {
|
||||
try {
|
||||
buffer.docShell.QueryInterface(Ci.nsIDocCharset).charset = val;
|
||||
yield window.PlacesUtils.setCharsetForURI(buffer.uri, val);
|
||||
buffer.docShell.reload(Ci.nsIWebNavigation.LOAD_FLAGS_CHARSET_CHANGE);
|
||||
}
|
||||
catch (e) { dactyl.reportError(e); }
|
||||
});
|
||||
return null;
|
||||
},
|
||||
completer: function (context) completion.charset(context)
|
||||
|
||||
Reference in New Issue
Block a user