Fork me on GitHub
#hoplon
<
2016-04-23
>
leontalbot00:04:22

can there be "interference" with hoplon

micha00:04:47

you could probably test pretty easily with a plain html file with a <script> tag in it

micha00:04:55

like use their demo

leontalbot00:04:25

already done. I mean, I've never experienced that with standard js

micha00:04:28

i can't think of what could interfere but it's possible

micha00:04:53

interesting

micha00:04:26

thatdoes look like interference

micha00:04:32

we cannot abide such things

leontalbot02:04:46

I go on with Hoplon. Maybe we can solve this.

leontalbot02:04:22

I'll update hoplon-leaflet repo when I am finished

micha12:04:11

yeah i have an idea to fix all these problems for good

levitanong12:04:45

edge of my seat

micha12:04:02

the idea is to only monkeypatch Element for dom elements constructed via the hoplon api

micha12:04:29

instead of patching Element.prototype

micha12:04:52

that way jQuery plugins and such won't need to go through the hoplon machinery

dm316:04:07

something like

(defn- make-elem-ctor
  [tag]
  (fn [& args]
    (let [e (doto (.createElement js/document tag) 
              (set-appendChild!  #(.-hoplonKids %))
              (set-removeChild!  #(.-hoplonKids %))
              (set-insertBefore! #(.-hoplonKids %))
              (set-replaceChild! #(.-hoplonKids %)))]
      (-> e ensure-kids! (apply args)))))
?