Merge pull request #4838 from FreeCodeCamp/fix/iframe-jquery-proxy

Fix use the document as the proxy for jquery
This commit is contained in:
Logan Tegman
2015-11-30 21:56:47 -08:00

View File

@ -8,10 +8,8 @@ window.__$(function() {
var tests = parent.tests;
var common = parent.common;
var editor = common.editor.getValue();
// grab the iframe body element
var body = document.getElementsByTagName('body');
// change the context of $ so it uses the iFrame for testing
var $ = __$.proxy(__$.fn.find, __$(body));
var $ = __$.proxy(__$.fn.find, __$(document));
common.runPreviewTests$ =
function runPreviewTests$({ tests = [], ...rest }) {