AnkiUniversal / Anki-Universal

Source code of Anki app on Windows 10.
GNU Affero General Public License v3.0
74 stars 11 forks source link

Javascript supporting #14

Open ghost opened 7 years ago

ghost commented 7 years ago

what about supporting javascript

AnkiUniversal commented 7 years ago

Hi, the app already supports JavaScript. However, the compiler engine is written by Microsoft who is famous for not following standard practices (i.e. Internet Explorer and Edge engine.) So while some scripts work on Android and iOS, they may not work on Windows 10 Engine, especially embedded scripts in card template. Thus, it's better to use CSS to achieve what you need instead of using JavaScript.

i1459193 commented 6 years ago

I'm only able to run javascript with a trick: <img src="" style="display:none" onerror="/* JS with no line breaks */ ; return false;" />

Regular <script> tag doesn't work.