You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally reported in my comment here ines/course-starter-python#4 (comment), but I realized that this is a more general issue that also affects the spacy course, not just the Python course starter. It seems that js code included in slides via <script> tags is not executed correctly in the spacy course framework. I tried in the latest version of this GitHub repo by modifying the first slideshow (chapter1_01_introduction-to-spacy.md) to include the following just under the bullet points:
<script>console.log('This does not work')</script>
Nothing is written to the console and no errors are raised either. This is not a problem with reveal.js because downloading their example slideshow and including the same code in the index.html works just fine (more elaborate examples such as vegalite plots also work fine in reveal.js).
Curiously, it seems that javascript is enabled and working fine in the spacy course slides, because <noscript> tags do not execute either and if I include the same js as part of a button, the console does correctly show log messages when this button is pressed:
However, if the button references as function that has been defined inside <script> tags, the console throws an error that the function is not defined.
<script>functionmyFunction(){console.log('This does not work either')}</script><buttontype="button" onclick="myFunction()">Click me too</button>
I thought this meant that the <script> tags were filtered out from the source file at some point, but if I highlight the text in a slide and click "View source for highlighted", I can see that they are still there, so there must be something wrong elsewhere such as in their execution.
I tried grepping this git repo for anything related to these tags or the slides, but I didn't see anything that seemed to indicate that script js code execution was disabled. I am not familiar with js so I would very much appreciate how to troubleshoot this further. Eventually, I want to use this for displaying Vegalite plots and the old workaroudn for this did not work for me, probably because vegalite has changed how the plots are displayed and the jupyter plugin has been deprecated as it is no longer needed.
The text was updated successfully, but these errors were encountered:
Originally reported in my comment here ines/course-starter-python#4 (comment), but I realized that this is a more general issue that also affects the spacy course, not just the Python course starter. It seems that js code included in slides via
<script>
tags is not executed correctly in the spacy course framework. I tried in the latest version of this GitHub repo by modifying the first slideshow (chapter1_01_introduction-to-spacy.md
) to include the following just under the bullet points:Nothing is written to the console and no errors are raised either. This is not a problem with reveal.js because downloading their example slideshow and including the same code in the
index.html
works just fine (more elaborate examples such as vegalite plots also work fine in reveal.js).Curiously, it seems that javascript is enabled and working fine in the spacy course slides, because
<noscript>
tags do not execute either and if I include the same js as part of a button, the console does correctly show log messages when this button is pressed:However, if the button references as function that has been defined inside
<script>
tags, the console throws an error that the function is not defined.I thought this meant that the
<script>
tags were filtered out from the source file at some point, but if I highlight the text in a slide and click "View source for highlighted", I can see that they are still there, so there must be something wrong elsewhere such as in their execution.I tried grepping this git repo for anything related to these tags or the slides, but I didn't see anything that seemed to indicate that script js code execution was disabled. I am not familiar with js so I would very much appreciate how to troubleshoot this further. Eventually, I want to use this for displaying Vegalite plots and the old workaroudn for this did not work for me, probably because vegalite has changed how the plots are displayed and the jupyter plugin has been deprecated as it is no longer needed.
The text was updated successfully, but these errors were encountered: