updates to camp and things
This commit is contained in:
parent
16e1340a7c
commit
7724a42e73
442 changed files with 97335 additions and 8 deletions
38
static/js/cljs-runtime/goog.dom.asserts.js
Normal file
38
static/js/cljs-runtime/goog.dom.asserts.js
Normal file
|
@ -0,0 +1,38 @@
|
|||
goog.provide("goog.dom.asserts");
|
||||
goog.require("goog.asserts");
|
||||
goog.dom.asserts.assertIsLocation = function(o) {
|
||||
if (goog.asserts.ENABLE_ASSERTS) {
|
||||
var win = goog.dom.asserts.getWindow_(o);
|
||||
if (win) {
|
||||
if (!o || !(o instanceof win.Location) && o instanceof win.Element) {
|
||||
goog.asserts.fail("Argument is not a Location (or a non-Element mock); got: %s", goog.dom.asserts.debugStringForType_(o));
|
||||
}
|
||||
}
|
||||
}
|
||||
return o;
|
||||
};
|
||||
goog.dom.asserts.debugStringForType_ = function(value) {
|
||||
if (goog.isObject(value)) {
|
||||
try {
|
||||
return value.constructor.displayName || value.constructor.name || Object.prototype.toString.call(value);
|
||||
} catch (e) {
|
||||
return "\x3cobject could not be stringified\x3e";
|
||||
}
|
||||
} else {
|
||||
return value === undefined ? "undefined" : value === null ? "null" : typeof value;
|
||||
}
|
||||
};
|
||||
goog.dom.asserts.getWindow_ = function(o) {
|
||||
try {
|
||||
var doc = o && o.ownerDocument;
|
||||
var win = doc && (doc.defaultView || doc.parentWindow);
|
||||
win = win || goog.global;
|
||||
if (win.Element && win.Location) {
|
||||
return win;
|
||||
}
|
||||
} catch (ex) {
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
//# sourceMappingURL=goog.dom.asserts.js.map
|
Loading…
Add table
Add a link
Reference in a new issue