Skip to content

Conversation

@scotthovestadt
Copy link

No description provided.

@patricklodder
Copy link
Owner

@scotthovestadt I have a few reservations about this request because it will on purpose break jslint (not that it passes now, but this would mean it'd never pass) just to 'hack' requirejs, and in the same time defy the purpose of requirejs closures on the source. So I'm not sure if this should be merged. I'm not a RequireJS expert at all, but perhaps it's possible to create the global object inside a requirejs block like below?

var g = this;
requirejs(['jquery-zclip'], function (zclip) { 
  g['ZeroClipboard'] = zclip.ZeroClipboard; 
});

@patricklodder
Copy link
Owner

@scotthovestadt I created a patch I'm willing to merge into master at f88cbdf. Could you please verify if this solves the issue?

@munnja001
Copy link

Using this version of the library fixed the issues I was having using zclip with RequireJS.

@scotthovestadt
Copy link
Author

Thanks Patrick. I didn't see your previous comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants