| 4 | import {DOMSource, EventsFnOptions} from './DOMSource'; |
| 5 | |
| 6 | export class HTMLSource implements DOMSource { |
| 7 | private _html$: Stream<string>; |
| 8 | private _empty$: Stream<any>; |
| 9 | |
| 10 | constructor(html$: Stream<string>, private _name: string) { |
| 11 | this._html$ = html$; |
| 12 | this._empty$ = adapt(xs.empty()); |
| 13 | } |
| 14 | |
| 15 | public elements(): MemoryStream<string> { |
| 16 | const out: DevToolEnabledSource & MemoryStream<string> = adapt(this._html$); |
| 17 | out._isCycleSource = this._name; |
| 18 | return out; |
| 19 | } |
| 20 | |
| 21 | public select(selector: string): DOMSource { |
| 22 | return new HTMLSource(xs.empty(), this._name); |
| 23 | } |
| 24 | |
| 25 | public events(eventType: string, options?: EventsFnOptions): Stream<any> { |
| 26 | const out: Partial<DevToolEnabledSource> & Stream<any> = this._empty$; |
| 27 | out._isCycleSource = this._name; |
| 28 | return out; |
| 29 | } |
| 30 | } |
nothing calls this directly
no outgoing calls
no test coverage detected