Refactor the container/viewer checks in the BaseViewer constructor
The previous checks prevented specifying a container/viewer that was in another document/window. Fixes #12385
This commit is contained in:
parent
558d3870d3
commit
d37a445369
@ -150,8 +150,10 @@ class BaseViewer {
|
||||
) {
|
||||
if (
|
||||
!(
|
||||
this.container instanceof HTMLDivElement &&
|
||||
this.viewer instanceof HTMLDivElement
|
||||
this.container &&
|
||||
this.container.tagName.toUpperCase() === "DIV" &&
|
||||
this.viewer &&
|
||||
this.viewer.tagName.toUpperCase() === "DIV"
|
||||
)
|
||||
) {
|
||||
throw new Error("Invalid `container` and/or `viewer` option.");
|
||||
|
Loading…
x
Reference in New Issue
Block a user