Skip to content

Commit c81fc23

Browse files
authored
Fix videos on JS case study article (#15)
1 parent 8c2d50b commit c81fc23

File tree

1 file changed

+6
-7
lines changed
  • content/case-study-foreign-integration-js-browser

1 file changed

+6
-7
lines changed

content/case-study-foreign-integration-js-browser/index.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,9 @@ main = do
4444
In the above snippet we're creating an `IORef` and pass a callback incrementing it to a foreign function that installs a button in body, counting a number of clicks
4545
(note for brevity I used a multiline syntax that is not yet available for foreign calls). The callback closes over the `IORef` and correctly updates the number after each click.
4646

47-
<video controls>
48-
<source src="https://github.com/user-attachments/assets/ceb86903-d136-4821-8e2d-de2e433889a5" type="video/quicktime" />
49-
</video>
50-
47+
<center>
48+
<video src="https://github.com/user-attachments/assets/ceb86903-d136-4821-8e2d-de2e433889a5" type="video/quicktime" controls></video>
49+
</center>
5150

5251
Callbacks fully enable probably the most fascinating purpose of JavaScript backend, which is web programming. GHCJS has been around for quite some time now,
5352
however it is both outdated (being a GHC fork requiring separate maintenance; currently stuck on 8.10) and cumbersome to use (often necessitating a separate setup, typically through Nix). In one of my previous companies, while evaluating potential options for rewriting the frontend, I decided to use PureScript. It was close enough to Haskell and very easy to set up - it can be installed directly through `npm`, has its own `stack`-like package manager `spago` with a suite of existing bundler plugins, and a blazing fast language server.
@@ -406,9 +405,9 @@ Starting up http-server, serving dist/
406405
407406
Behold, a material button!
408407
409-
<video controls>
410-
<source src="https://github.com/user-attachments/assets/4abe2e52-0bd2-4cb7-99c0-c0b0a1796528" type="video/quicktime" />
411-
</video>
408+
<center>
409+
<video src="https://github.com/user-attachments/assets/4abe2e52-0bd2-4cb7-99c0-c0b0a1796528" type="video/quicktime" controls></video>
410+
</center>
412411
413412
### Bundling with `webpack` and `swc-loader`
414413

0 commit comments

Comments
 (0)