mirror of
https://github.com/checkly/headless-recorder.git
synced 2021-07-28 02:03:42 +03:00
26 lines
423 B
JavaScript
26 lines
423 B
JavaScript
export default class Block {
|
|
constructor (frameId, line) {
|
|
this._lines = []
|
|
this._frameId = frameId
|
|
|
|
if (line) {
|
|
line.frameId = this._frameId
|
|
this._lines.push(line)
|
|
}
|
|
}
|
|
|
|
addLineToTop (line) {
|
|
line.frameId = this._frameId
|
|
this._lines.unshift(line)
|
|
}
|
|
|
|
addLine (line) {
|
|
line.frameId = this._frameId
|
|
this._lines.push(line)
|
|
}
|
|
|
|
getLines () {
|
|
return this._lines
|
|
}
|
|
}
|