You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
The text was updated successfully, but these errors were encountered:
Denis535
changed the title
How to use it with JQuery?
How to use gulp-dom with JQuery?
Nov 26, 2015
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);
The text was updated successfully, but these errors were encountered: