2020-11-30 15:05:16 +00:00
|
|
|
{{#if (not this.disabled)}}
|
|
|
|
{{#if (eq this.loading "lazy")}}
|
|
|
|
{{! in order to use intersection observer we need a DOM element on the page}}
|
|
|
|
<data
|
|
|
|
{{did-insert this.connect}}
|
|
|
|
aria-hidden="true"
|
|
|
|
style="width: 0;height: 0;font-size: 0;padding: 0;margin: 0;"
|
|
|
|
/>
|
|
|
|
{{else}}
|
|
|
|
{{did-insert this.connect}}
|
|
|
|
{{/if}}
|
|
|
|
{{did-update this.attributeChanged 'src' @src}}
|
|
|
|
{{did-update this.attributeChanged 'loading' @loading}}
|
|
|
|
{{will-destroy this.disconnect}}
|
2020-03-19 10:28:21 +00:00
|
|
|
{{/if}}
|
2020-11-30 15:05:16 +00:00
|
|
|
{{did-update this.attributeChanged 'disabled' @disabled}}
|
|
|
|
{{yield (hash
|
|
|
|
data=this.data
|
|
|
|
error=this.error
|
|
|
|
Source=(if this.data
|
|
|
|
(component 'data-source' disabled=(not (eq this.error undefined)))
|
|
|
|
''
|
|
|
|
)
|
|
|
|
)}}
|