Created
June 3, 2014 20:22
-
-
Save Inviz/3a7175707c2e64d75b70 to your computer and use it in GitHub Desktop.
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
it 'element resized by inserting child', (done) -> | |
scope.innerHTML = """ | |
<div style="display:inline-block;" id="box1" class="box">zOne</div> | |
<div style="width:222px;" id="box2" class="box">One</div> | |
""" | |
engine.run commands: [ | |
['eq', ['get$','height',['$class','box']],['get$','intrinsic-width',['$id','box1']]] | |
] | |
count = 0 | |
listener = (e) -> | |
count++ | |
if count is 1 | |
el = scope.querySelector('#box1') | |
el.innerHTML = "<div style=\"width:111px;\"></div>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment