domready icon indicating copy to clipboard operation
domready copied to clipboard

Conflict with require js

Open cloudgen opened this issue 10 years ago • 6 comments

Line 7: else if (typeof define == 'function' && typeof define.amd == 'object') define(definition)

create an no name function which then crash the execution of javascript under the environment of requirejs.

cloudgen avatar Oct 31 '14 03:10 cloudgen

this has worked for years and quite possibly a bug with your implementation or the optimizer you're using. unless you can put together a test case i will mark this as won't fix.

ded avatar Nov 02 '14 02:11 ded

I have the same problem when working with requireJs

zjiash avatar Nov 26 '14 09:11 zjiash

@cloudgen its very likely because you load the module without using requirejs...(eg. include it directly to the page)

what is the purpose having require js in your env without using it

normanzb avatar Oct 23 '15 16:10 normanzb

I included a javascript provided by an advertisement provider which include this module directly without using requirejs (The Advertisement provider assume people using their script without any requirejs).

So, the advertisement script crashed everytime I included in my page. This is the circumstance that I cannot modify the code which was hosted somewhere else. The only solution was I had abandoned the advertisement provider.

cloudgen avatar Dec 15 '15 05:12 cloudgen

looks like this can be closed?

jasonkarns avatar Apr 28 '16 13:04 jasonkarns

Yes

2016-04-28 21:20 GMT+08:00 Jason Karns [email protected]:

looks like this can be closed?

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/ded/domready/issues/41#issuecomment-215420501

cloudgen avatar Apr 28 '16 22:04 cloudgen