cujojs / curl

curl.js is small, fast, extensible module loader that handles AMD, CommonJS Modules/1.1, CSS, HTML/text, and legacy scripts.
https://github.com/cujojs/curl/wiki
Other
1.88k stars 216 forks source link

apiName, apiContext #77

Closed net-me closed 12 years ago

net-me commented 12 years ago

Hi. Please allow apiName and apiContext to be passed from

curl({ apiName:'name', apiContext:{} })

For now its work only from pre-configuration part

<script>
   curl = { apiName:'name', apiContext:{} };
</script>
<script src="curl.js"></script>
unscriptable commented 12 years ago

Hi @net-me!

Interesting. Is there some complexity that prevents you from doing the following?

<script src="curl.js"></script>
<script>
var myContext = {};
myContext.myProp = curl;
myContext.myProp(['moduleA'], function (moduleA) { /*...*/ });
</script>

Regards,

-- John

net-me commented 12 years ago

i need to cut the curl from window object (my js app loaded as widget on other page)

unscriptable commented 12 years ago

I put this on the list for 0.6.3

unscriptable commented 12 years ago

fixed in 0.6.3 (also: defineContext and defineName)

net-me commented 12 years ago

thx, man !