This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-05-02
Channels
- # announcements (1)
- # babashka (4)
- # beginners (39)
- # calva (36)
- # cherry (11)
- # cider (23)
- # clj-on-windows (3)
- # clojure (105)
- # clojure-brasil (1)
- # clojure-chicago (3)
- # clojure-conj (8)
- # clojure-denver (4)
- # clojure-europe (18)
- # clojure-germany (5)
- # clojure-hungary (13)
- # clojure-nl (1)
- # clojure-norway (31)
- # clojure-sweden (9)
- # clojure-uk (2)
- # clojurescript (22)
- # core-async (4)
- # cursive (8)
- # data-science (25)
- # datomic (14)
- # devops (1)
- # emacs (9)
- # events (5)
- # holy-lambda (32)
- # hyperfiddle (26)
- # introduce-yourself (2)
- # kaocha (1)
- # leiningen (11)
- # lsp (17)
- # malli (8)
- # off-topic (84)
- # pedestal (4)
- # polylith (2)
- # re-frame (17)
- # reitit (1)
- # releases (1)
- # remote-jobs (1)
- # shadow-cljs (8)
- # sql (4)
- # tools-deps (8)
- # transit (5)
- # vim (1)
- # vscode (1)
- # xtdb (45)
I'm using flatted JS library (to use stringify
, basically similar to JSON.stringify), and I get very odd error in CLJS REPL, any ideas?
["flatted" :refer [stringify]]
------
(stringify (pc/find-by-name "model")) ;; JS object
Execution error (SecurityError) at (<cljs repl>:1).
Blocked a frame with origin "" from accessing a cross-origin frame.
=> :repl/exception!
pretty clear error? this is your browser telling you that you are trying to do cross site scripting, which it blocks for security reasons
It's an object, from PlayCanvas library - simple entity object
I can run (pc/find-by-name "model")
alone and get;
=> #object[Entity [object Object]],
"object" has a very very broad definition in JS, if it is from another frame/context/document it only looks like an object, but in fact is a proxy to the actual thing in the other context. which limits the things you are allowed to do with it
could be enough if the object holds a reference to something, doesn't need to be the whole object
I see thank you for the explanation!