Sha256: 11d06c6d9b3e72d33240ad39adace728fc2a2fa0de371e2be674c456121817c5
Contents?: true
Size: 738 Bytes
Versions: 22
Compression:
Stored size: 738 Bytes
Contents
# Xray Backbone integration. This involves hooking into the lifecycle # of Backbone.View by monkey patching its prototype. Would love a cleaner # way of doing this, as nobody wants to this stuff in their stack traces. return unless window.Backbone && window.Xray # Wrap Backbone.View::_ensureElement to add the view to Xray once # its element has been setup. _ensureElement = Backbone.View::_ensureElement Backbone.View::_ensureElement = -> _.defer => if info = Xray.constructorInfo @constructor Xray.ViewSpecimen.add @el, info _ensureElement.apply(this, arguments) # Cleanup when view is removed. _remove = Backbone.View::remove Backbone.View::remove = -> Xray.ViewSpecimen.remove @el _remove.apply(this, arguments)
Version data entries
22 entries across 22 versions & 1 rubygems