skariel / webalchemy

Modern web development with Python
MIT License
346 stars 21 forks source link

wrap all JS code in its own namespace #133

Open skariel opened 10 years ago

skariel commented 10 years ago

All the javascript should be wrapped in its own "namespace" (javascript object) - so to avoid collision with other people's javascript

ie. put everything (global functions, global variables) inside WebAlchemy object, possibly with alias for a short symbol ("W" ? )

like jquery wraps everything inside jQuery with alias "$" jquery also allows changing to another alias in order to to avoid collision with other javascript that uses the "$" variable - see http://learn.jquery.com/using-jquery-core/avoid-conflicts-other-libraries/

see issue #100