Comments (16)
var MyNameSpace = YUI;
from yui3.
what if I already have something called YUI on my page?
Then when I load the YUI library, it will override it.
One possible use case is being able to support multiple versions of YUI on the same page.
from yui3.
I guess I can hack it by globally replacing 'YUI' with 'MyNamespace' in the source code. But it's still a hack.
from yui3.
You can use shifter to make a custom build:
cd yui3/src
shifter --walk --replace-yuiglobalvar=FOO
Then you can do one of two things:
Hand modify the global in build/yui/yui.js
OR
<script>
var exports = {};
</script>
<script src="/path/to/your/yui.js"></script>
<script>
var FOO = exports.YUI;
</script>
from yui3.
How is shifter going to find @YUIGLOBALVAR@? I can't find this place holder anywhere in the source code.
from yui3.
When shifter builds the lib with that command, it will wrap the code
in YUI.add. YUI is a variable in shifter.
from yui3.
Gotcha.
@YUIGLOBALVAR@ is in shifter, and the remaining offender is src/yui/js/yui.js
Will you consider a patch to make the YUI global variable configurable?
Anyway, thank you for your help.
from yui3.
Yup, we should make that configurable.
There may be some edge cases in other modules that use the YUI
var too.
I'll also keep that in mind with the seed rewrite I'm working on.
from yui3.
Hi Dave,
I started the work on making YUI global variable configurable.
Can you let me know if I am headed down the right road? Thanks.
from yui3.
Changing them from YUI
to Y
is not the proper thing. Changing them from YUI
to @YUIGLOBALVAR
is the best thing.
from yui3.
Is it possible to use an alternative marker to indicate a place holder variable? Because using the @ sign confuses most IDEs since variable name cannot start with the @ sign.
Perhaps,
from yui3.
Just hold off on this for now, we discussed this on a Hangout on
Friday. I think I have the proper way to fix this lined out in my new
seed changes.
from yui3.
Awesome!
from yui3.
@davglass hi Dave, is there any update on this?
from yui3.
Any update on this ?
from yui3.
It sucks this issue was not addressed, and left to rot. Unfortunately, I don't believe there are any current plans for this feature. However, this may be resolved next sprint (starting Nov. 15th).
from yui3.
Related Issues (20)
- _initUIEvent in widget-uievents.js throws up in chrome when used more than once.
- YUI autocompletelist is closing on scroll bar click
- recommended doc mode for the different yui versions?
- Complete local build instructions (new problems) HOT 5
- Detection of Edge from user agent - (YUI-UA)
- NSP Security check errors HOT 2
- event source polyfill performance issue in IE11
- In catalan, the first day of the calendar is Monday
- AutoComplete: List doesn't close when it loses focus after scrolling
- Host access issue HOT 1
- delete this issue
- inconsitent behavior for parse/stringify of querystring module
- Website not working HOT 9
- Mu
- Hdjd
- Eiieekkske
- FreeBSD PR list
- Dudu
- Wrong table then other render!!!
- Critical Issue: Insufficient Entropy in cryptiles
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yui3.