Created
December 7, 2012 03:46
-
-
Save n1mmy/4230612 to your computer and use it in GitHub Desktop.
Meteor issue #458
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<title>ie9bug_test</title> | |
</head> | |
<body> | |
{{> hello}} | |
</body> | |
<template name="hello"> | |
<h1>IE9 bug</h1> | |
{{#with other}}x{{#with inner}} | |
<span class="foo">Click</span> | |
{{/with}}y{{/with}} | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (Meteor.isClient) { | |
var startTime = +new Date; | |
Template.hello.other = {text: "We are in the other context "}; | |
Template.hello.otherList = function () { | |
return [{text: "We are in the danger context "}]; | |
}; | |
Template.hello.inner = {text: 'hot dog!'}; | |
Template.hello.myList = function () { | |
console.log("list ", +new Date); | |
return [{text: "We are in the '#each' context "}]; | |
}; | |
var good = []; | |
var bad = []; | |
Template.hello.events({ | |
'click .foo' : function (evt) { | |
good = []; | |
_.each(evt.target.parentNode.childNodes, function (t) { | |
// good.push(t); | |
}); | |
//good = _.clone(evt.target.parentNode.childNodes); | |
console.log('foo ', this.text); | |
} | |
}); | |
/* | |
var x = Meteor.setInterval(function () { | |
var range = LiveRange.findRange( | |
Spark._TAG, DomUtils.find(document, '.foo')); | |
var types = []; | |
while(range) { | |
types.push(range.type); | |
range = range.findParent(); | |
} | |
console.log(+new Date, types); | |
if (types[1] !== 'data') { | |
console.log(+new Date() - startTime); | |
Meteor.clearInterval(x); | |
} | |
}, 10); | |
Meteor.setTimeout(function () { | |
Meteor.clearInterval(x); | |
}, 5000); | |
*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment