Fork me on GitHub
#hoplon
<
2015-12-06
>
xificurC13:12:53

how does one achieve this with hoplon?

<!--[if lte IE 8]>
  <link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/grids-responsive-old-ie-min.css">
<![endif]-->
<!--[if gt IE 8]><!-->
  <link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/grids-responsive-min.css">
<!--<![endif]-->

xificurC13:12:43

by the way this <[email protected]@<>#@$[]> syntax is ridiculous

onetom13:12:39

@xifi: there is ($comment "...") but that won't help in this case. however if u look into its source code, u might see how it was done and u can create conditionals yourself too.

onetom13:12:32

but u can also provide dom element content as string with the :html attribute, but in this case that might not help directly either

xificurC13:12:59

@onetom: Hey simple_smile I hoped there's a simpler way to do this in hoplon since we are building the page dynamically anyway. Isn't there something like

(if (and (= browser 'ie) (< browser-version 8))
  (link rel ...)
...

onetom13:12:42

yeah, there should be something like that. i vaguely remember looking into this but at the end i was like "fuck ie8" and moved on

onetom13:12:24

i dont think there is anything built in like that in hoplon at the moment, but even if there would be, it would just be a thin wrapper around a some browser api

onetom14:12:14

i would recommend digging around in mdn. like if i google for "mdn browser version" the 1st hit is: https://developer.mozilla.org/en/docs/Browser_Detection_and_Cross_Browser_Support

onetom14:12:54

though the 1st line in it says: > Warning: The content of this article may be out of date. This article was written in 2003 and is not on par with current standards. so keep diggin' 😉

xificurC14:12:38

I'll ditch IE8 for now, was mostly curious. Thanks simple_smile

micha14:12:32

@onetom: i think i know why that loop-tpl bug happens

micha14:12:38

with the events

micha14:12:41

@xifi: did you see this, in the hoplon.core namespace: (def ^:private is-ie8 (not (aget js/window "Node")))

xificurC21:12:39

@micha: Hi. I actually did but didn't know what to think of it. First of all the name says is-ie8 not is-ie-lt-8 or something similar, secondly I don't understand the "Node" lookup logic. Care to elaborate? simple_smile