makeSagecell returns undefined, not cellInfo

23 views
Skip to first unread message

Ray Ellis

unread,
Mar 2, 2022, 11:50:00 AM3/2/22
to sage-cell

     Has there been a change to the makeSagecell interface? It used to return a cellInfo object that could be used in a later call to deleteSagecell, but although it creates a cell as expected, the following code displays the returned value as "undefined", not "[object Object]":

<html>
    <head>
        <script src="https://sagecell.sagemath.org/static/embedded_sagecell.js"></script>
        <script>
         const info = window.sagecell.makeSagecell({
             inputLocation: "#mycell"
         })
         alert(info)
        </script>
    </head>
    <body>
        <div id="mycell"></div>
    </body>
</html>

     This behavior is seen in Chrome and Firefox browsers, on current Linux and Windows 10 systems, and confirmed in the debugger and console logs. It appears that the new cell is now created asynchronously to the makeSagecell call, and nothing is returned from the call. If this isn't a bug (or my cluelessness :-), how do you identify the cell to a subsequent deleteSagecell call? If it's a bug, is the normal procedure to raise an issue on github? And if it's my cluelessness, what am I missing?

     Thanks in advance for your help. And thanks for sharing sagecell!

           -- Ray

Andrey Novoseltsev

unread,
Mar 4, 2022, 12:49:29 PM3/4/22
to sage-cell
Apologies for the delay - for some reason notification went into spam.

This is  a bug that has to be fixed, thank you for reporting it! Raising an issues on github would be appropriate as well.
Reply all
Reply to author
Forward
0 new messages