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 3820350b9c
commit 1a8188bd20

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' ||