Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use gulp-dom with JQuery? #24

Open
Denis535 opened this issue Nov 26, 2015 · 0 comments
Open

How to use gulp-dom with JQuery? #24

Denis535 opened this issue Nov 26, 2015 · 0 comments

Comments

@Denis535
Copy link

To use jquery, jquery needs window object.
var jquery = require('jquery');
...
var $ = jquery(window);

But you pass into callback only window.document object. I don't know a way to get window from document.
So, can you fix your code from:
var mutated = mutator.call(window.document);
To:
var mutated = mutator.call(window.document, window);
Or better:
var mutated = mutator.call(null, window, window.document);

@Denis535 Denis535 changed the title How to use it with JQuery? How to use gulp-dom with JQuery? Nov 26, 2015
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

No branches or pull requests

1 participant