diff --git a/karma-jqlite.conf.js b/karma-jqlite.conf.js index 267e952f5918..7b511720d212 100644 --- a/karma-jqlite.conf.js +++ b/karma-jqlite.conf.js @@ -5,7 +5,12 @@ module.exports = function(config) { sharedConfig(config, {testName: 'AngularJS: jqLite', logFile: 'karma-jqlite.log'}); config.set({ - files: angularFiles.mergeFilesFor('karma'), + files: angularFiles.mergeFilesFor('karma').concat({ + pattern: "test/fixtures/**/*.html", + served: true, + watched: true, + included: false + }), exclude: angularFiles.mergeFilesFor('karmaExclude'), junitReporter: { diff --git a/karma-jquery.conf.js b/karma-jquery.conf.js index 4af9508d49d8..6a592d6a4704 100644 --- a/karma-jquery.conf.js +++ b/karma-jquery.conf.js @@ -5,7 +5,12 @@ module.exports = function(config) { sharedConfig(config, {testName: 'AngularJS: jQuery', logFile: 'karma-jquery.log'}); config.set({ - files: angularFiles.mergeFilesFor('karmaJquery'), + files: angularFiles.mergeFilesFor('karmaJquery').concat({ + pattern: "test/fixtures/**/*.html", + served: true, + watched: true, + included: false + }), exclude: angularFiles.mergeFilesFor('karmaJqueryExclude'), junitReporter: { diff --git a/src/jqLite.js b/src/jqLite.js index 664ba7b75feb..b820f5e71710 100644 --- a/src/jqLite.js +++ b/src/jqLite.js @@ -793,7 +793,7 @@ forEach({ }, contents: function(element) { - return element.childNodes || []; + return element.contentDocument || element.childNodes || []; }, append: function(element, node) { diff --git a/test/fixtures/iframe.html b/test/fixtures/iframe.html new file mode 100644 index 000000000000..7b37d91d62c1 --- /dev/null +++ b/test/fixtures/iframe.html @@ -0,0 +1,9 @@ + + +
+