Probably the easier way would be to just get its new size when its content 
changes, you can Json.Decode it out of a custom event if you can somehow 
get it to fire an event, any event (a port, or just grab it from the port?).

Would it not be easiest to finagle the CSS to do what you want instead, or 
are you needing to know the size explicitly in code?


On Tuesday, January 31, 2017 at 9:16:26 AM UTC-7, Rupert Smith wrote:
>
> On Tuesday, January 31, 2017 at 4:14:51 PM UTC, Rupert Smith wrote:
>>
>> If I can get an event to fire then I can use debois/elm-dom to get its 
>> size.
>>
>> I am rendering some markdown into a div, and I want to pick up the new 
>> size of the div as its contents change. The markdown is being edited 
>> elsewhere, so I can't just use onInput. It is possiblt to walk around the 
>> DOM tree with elm-dom, but that is something I would rather avoid. Can 
>> anyone think of a way of getting an event to trigger on the div having its 
>> contents changed?
>>
>> Looking through the list of DOM events, I didn't figure out yet which 
>> event I can make use of...
>>
>> http://www.w3schools.com/jsref/dom_obj_event.asp
>>
>
> I should also add that the div where the content being edited is not the 
> parent/child/sibling of the one showing the markdown, which is why walking 
> the DOM tree from the input div to the output div is going to be tricky. 
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to