Fork me on GitHub
#portal
<
2021-01-05
>
grumplet12:01:46

Hiya - I’m looking at using Portal while developing a health related app containing large statistical model. This is a shadow-cljs single page app. Early days yet, so I’m going through the Portal demos and code.

grumplet12:01:10

I’m hitting issues when accessing the web portal tests though

grumplet12:01:20

So, from the repo I can do `make e2e/jvm’ etc and they all work fine except for ‘make e2e/web’. This barfs with an error when loading Portal:

grumplet12:01:25

Downloading: djblue/portal/0.6.1/portal-0.6.1.pom from clojars
Downloading: djblue/portal/0.6.1/portal-0.6.1.jar from clojars
WARNING: Use of :main-opts with -A is deprecated. Use -M instead.
ClojureScript 1.10.764
cljs.user=> (ns cljs.user
  (:require [clojure.core.protocols :refer [Datafiable]]
            [ :refer [start]]
            [portal.web :as p]))

cljs.user=> (def portal (p/open))
Execution error (TypeError) at (<cljs repl>:1).
Cannot set property 'onunload' of null

grumplet12:01:07

I’m guessing there’s something special you need in your dev environment so Chrome launches correctly for Portal? There was a super-brief mention of using headless Chrome in the apropos video.

djblue15:01:47

Hi @U0YBFTSLS, I think you need to enable pop-ups for localhost so portal can open the child window

grumplet11:01:13

Thanks Chris - yes that was the problem.

grumplet11:01:48

Now to try and integrate it with my app and calva jack-in!

🎉 3