Allow using element resize listeners from javascript connectors (#11996)

Change-Id: I97b280c2e260752be87ce85d2eda81ec4f14d4fe