UNPKG

@scandit/web-datacapture-barcode

Version:

Scandit Data Capture SDK for the Web

4 lines (2 loc) 454 B
var o=class{constructor(r){this.subscribers=new Set;this.property={key:r,value:null};}addSubscriber(r){var e;this.subscribers.add(r),(e=r.onPropertyChanged)==null||e.call(r,this.property);}removeSubscriber(r){this.subscribers.delete(r);}setProperty(r){var e;if(this.property.value!==r.value){this.property={key:this.property.key,value:r.value};for(let t of this.subscribers)(e=t.onPropertyChanged)==null||e.call(t,this.property);}}}; export { o as a };