Skip to content

Commit

Permalink
Merge pull request #296 from canjs/ie11-compat
Browse files Browse the repository at this point in the history
Ie11 compat
  • Loading branch information
thomaswilburn authored Sep 7, 2018
2 parents adac8a9 + ecb5dd0 commit 3c1dad6
Show file tree
Hide file tree
Showing 5 changed files with 357 additions and 357 deletions.
2 changes: 1 addition & 1 deletion can-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ var Component = Construct.extend(
});
} else {
var removalDisposal = domMutate.onNodeRemoval(el, function () {
if (!el.ownerDocument.contains(el)) {
if (!el.ownerDocument.documentElement.contains(el)) {
removalDisposal();
callTeardownFunctions();
}
Expand Down
2 changes: 1 addition & 1 deletion test/component-define-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ QUnit.test("ViewModel properties default to DefineList if set to an Array (#225)
view: "Hello, World",
ViewModel: {
items: {
default() {
default: function() {
return [ "one", "two" ];
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/component-slot-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ QUnit.test("able to pass individual values (#291)", function() {

var frag = template();

var passValuesToSlots = frag.firstElementChild;
var passValuesToSlots = frag.firstElementChild || frag.firstChild;
passValuesToSlots.viewModel.add(5);
var count = passValuesToSlots.querySelector(".count");

Expand Down
6 changes: 3 additions & 3 deletions test/component-view-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ helpers.makeTests("can-component views", function(doc, runTestInOnlyDocument){
Component.extend({
tag: 'child-tag',

ViewModel: SimpleMap.extend({
ViewModel: DefineMap.extend({
init: function () {
inited++;
}
Expand All @@ -187,8 +187,8 @@ helpers.makeTests("can-component views", function(doc, runTestInOnlyDocument){

view: stache('{{#shown}}<child-tag></child-tag>{{/shown}}'),

viewModel: observe.Object.extend("ParentTag",{},{
shown: false
viewModel: DefineMap.extend("ParentTag",{},{
shown: { default: false }
}),
events: {
' inserted': function () {
Expand Down
Loading

0 comments on commit 3c1dad6

Please sign in to comment.