Skip to content

Instantly share code, notes, and snippets.

@Inviz
Created June 3, 2014 20:22
Show Gist options
  • Save Inviz/3a7175707c2e64d75b70 to your computer and use it in GitHub Desktop.
Save Inviz/3a7175707c2e64d75b70 to your computer and use it in GitHub Desktop.
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