Support chrome: and resource: location protocols.

XMLHttpRequest tried to load `chrome:` and `resource:` protocols as if
they were not local. Change isFileProtocol flag to accurately represent
them.
This commit is contained in:
Kristoffer Walker 2010-06-28 05:01:37 +08:00 committed by Alexis Sellier
parent 7a5e10e996
commit 8c89feac3e

View File

@ -2,7 +2,9 @@
// browser.js - client-side engine
//
var isFileProtocol = location.protocol === 'file:';
var isFileProtocol = (location.protocol === 'file:' ||
location.protocol === 'chrome:' ||
location.protocol === 'resource:');
less.env = location.hostname == '127.0.0.1' ||
location.hostname == '0.0.0.0' ||