"new window.ResizeObserver(this.resize)" Error

Q

Why am I getting the "error creating viewer: TypeError: undefined is not a constructor" error at "new window.ResizeObserver(this.resize)"?

✍: FYIcenter.com

A

If you load a 3Dmol.js HTML file in an older Apple Safari Web browser, you will get the following error in the browser developer console.

error creating viewer: TypeError: undefined is not a constructor 
  (evaluating 'new window.ResizeObserver(this.resize)')
- (anonymous function) — 3Dmol.js:4059

This is because old Safari Web browsers do not support newer releases of WebGL technology.

If you load the same HTML file in the latest Google Chrome Web browser, you will no see any errors.

 

Difference between 3Dmol.js and 3Dmol-min.js

Use of Anonymous Function for 3Dmol.js

Getting Started with 3Dmol.js

⇑⇑ 3Dmol.js FAQ

2023-09-07, 420🔥, 0💬