Вопрос

I am using the following namespace for a graphics demo

(ns foo.core
(:use [clojure.browser.dom :only [get-element]]))

However, I return a File not found exception for clojure browser dom in the classpath. Clojurescript has been pulled, and is contained within the file I cd into. But is not contained in the file I am trying to load, after having accessed the REPL.

Is clojure.browser.dom out of date? Or, am I missing something within the implementation?

Edit I have not included the dependency for this file.

Это было полезно?

Решение

That namespace is correct:
https://github.com/clojure/clojurescript/blob/master/src/cljs/clojure/browser/dom.cljs

Maybe the problem is the ns form? Try

(ns foo.core
  (:require [clojure.browser.dom :refer [get-element]]))

Also, just in case, be sure to name your file .cljs and restart the cljsbuild compiler, just in case.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top