diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-09-01 16:06:22 -0400 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-09-01 16:06:22 -0400 |
commit | e3d7ec8db7a86d475fba00d48f9cbe150feb36ff (patch) | |
tree | 68b3ad1260e013ea380a1845c671f5f4a59eb4a0 /ext/fg/js/source.js | |
parent | e3e7dad2cc896a84c5c332f4c95a8984386be844 (diff) |
Create container for imposter element
The container will prevent the imposter element's size from affecting the document's primary scrollbars.
Diffstat (limited to 'ext/fg/js/source.js')
-rw-r--r-- | ext/fg/js/source.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/fg/js/source.js b/ext/fg/js/source.js index 409e81aa..69d8197d 100644 --- a/ext/fg/js/source.js +++ b/ext/fg/js/source.js @@ -25,19 +25,19 @@ const IGNORE_TEXT_PATTERN = /\u200c/; */ class TextSourceRange { - constructor(range, content, imposter) { + constructor(range, content, imposterContainer) { this.range = range; this.content = content; - this.imposter = imposter; + this.imposterContainer = imposterContainer; } clone() { - return new TextSourceRange(this.range.cloneRange(), this.content, this.imposter); + return new TextSourceRange(this.range.cloneRange(), this.content, this.imposterContainer); } cleanup() { - if (this.imposter !== null && this.imposter.parentNode !== null) { - this.imposter.parentNode.removeChild(this.imposter); + if (this.imposterContainer !== null && this.imposterContainer.parentNode !== null) { + this.imposterContainer.parentNode.removeChild(this.imposterContainer); } } |