plotly / dash-cytoscape

Interactive network visualization in Python and Dash, powered by Cytoscape.js
https://dash.plot.ly/cytoscape
MIT License
587 stars 120 forks source link

Add polyfill to fix context-menu extension in Safari #201

Closed emilykl closed 7 months ago

emilykl commented 7 months ago

About

The cytoscape-context-menu extension causes a breaking "Illegal Constructor" error in Safari (see issue here).

Screen Shot 2023-11-30 at 10 18 17 AM This can be fixed by adding an existing polyfill to the project.

Description of changes

This PR adds the necessary polyfill to fix the "Illegal Constructor" error in Safari.

Pre-Merge checklist

Steps to test

  1. Check out branch
  2. Run npm install && npm run build:all
  3. Run the context menu demo Dash app: python demos/usage-context-menu.py and navigate to http://127.0.0.1:8050 in Safari
  4. If the app loads properly without an "Illegal Constructor" Javascript error, all is good.