Created
February 6, 2015 23:41
-
-
Save sritchie/a8f51c104d6c0b522a4d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WARNING: 3 error(s), 0 warning(s) | |
ERROR: JSC_BASE_CLASS_ERROR. incorrect use of goog.base: First argument must be 'this'. at /Users/sritchie/code/clojure/racehub.com/resources/public/assets/generated/racehub/om/router.js line 520 : 104 | |
ERROR: JSC_BASE_CLASS_ERROR. incorrect use of goog.base: First argument must be 'this'. at /Users/sritchie/code/clojure/racehub.com/resources/public/assets/generated/racehub/om/router.js line 523 : 223 | |
ERROR: JSC_BASE_CLASS_ERROR. incorrect use of goog.base: First argument must be 'this'. at /Users/sritchie/code/clojure/racehub.com/resources/public/assets/generated/racehub/om/router.js line 526 : 250 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; The Macro | |
(defn- to-property [sym] | |
(symbol (str "-" sym))) | |
;; http://www.50ply.com/blog/2012/07/08/extending-closure-from-clojurescript/ | |
(defmacro goog-extend [type base-type ctor & methods] | |
`(do (defn ~type ~@ctor) | |
(goog/inherits ~type ~base-type) | |
~@(map | |
(fn [method] | |
`(set! | |
(.. ~type -prototype ~(to-property (first method))) | |
(fn ~@(rest method)))) | |
methods))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(route/goog-extend | |
QueryTokenTransformer goog/history.Html5History.TokenTransformer | |
([] (goog/base (js* "this"))) | |
(retrieveToken | |
[path-prefix loc] | |
(goog/base (js* "this") "retrieveToken" path-prefix loc) | |
(str (.substr (.-pathname js/location) | |
(.-length path-prefix)) | |
(.-search js/location) | |
(.-hash js/location))) | |
(createUrl | |
[token path-prefix loc] | |
(goog/base (js* "this") "createUrl" token path-prefix loc) | |
(str path-prefix token))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
racehub.om.router.QueryTokenTransformer = (function QueryTokenTransformer(){var G__183483 = this;return goog.base(G__183483); | |
}); | |
var G__183484_183495 = racehub.om.router.QueryTokenTransformer;var G__183485_183496 = goog.history.Html5History.TokenTransformer;goog.inherits(G__183484_183495,G__183485_183496); | |
racehub.om.router.QueryTokenTransformer.prototype.retrieveToken = (function (path_prefix,loc){var G__183486_183497 = this;var G__183487_183498 = "retrieveToken";var G__183488_183499 = path_prefix;var G__183489_183500 = loc;goog.base(G__183486_183497,G__183487_183498,G__183488_183499,G__183489_183500); | |
return (''+cljs.core.str.cljs$core$IFn$_invoke$arity$1(location.pathname.substr(path_prefix.length))+cljs.core.str.cljs$core$IFn$_invoke$arity$1(location.search)+cljs.core.str.cljs$core$IFn$_invoke$arity$1(location.hash)); | |
}); | |
racehub.om.router.QueryTokenTransformer.prototype.createUrl = (function (token,path_prefix,loc){var G__183490_183501 = this;var G__183491_183502 = "createUrl";var G__183492_183503 = token;var G__183493_183504 = path_prefix;var G__183494_183505 = loc;goog.base(G__183490_183501,G__183491_183502,G__183492_183503,G__183493_183504,G__183494_183505); | |
return (''+cljs.core.str.cljs$core$IFn$_invoke$arity$1(path_prefix)+cljs.core.str.cljs$core$IFn$_invoke$arity$1(token)); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment