mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-08-09 04:14:04 +00:00
namespace handling improvements, spec for noConflict
This commit is contained in:
21
src/env.js
21
src/env.js
@ -1,11 +1,16 @@
|
||||
/*
|
||||
* Leaflet namespace config, allows using any global variable instead of L
|
||||
* Leaflet namespace config, allows using any global variable instead of L & restoring the original value
|
||||
*/
|
||||
|
||||
var originalL = window.L,
|
||||
L = {};
|
||||
|
||||
L.noConflict = function() {
|
||||
window.L = originalL;
|
||||
return this;
|
||||
};
|
||||
(function() {
|
||||
var originalL = window.L;
|
||||
|
||||
L = {
|
||||
version: '0.0.1'
|
||||
};
|
||||
|
||||
L.noConflict = function() {
|
||||
window.L = originalL;
|
||||
return this;
|
||||
};
|
||||
})();
|
Reference in New Issue
Block a user