Skip to content

Instantly share code, notes, and snippets.

dojo.declare("Thinger", dijit._Widget, {
startup: function(){
alert("NO MATTER HOW HARD YOU TRY OR HOW MAD YOU GET THIS WILL NEVER RUN!")
},
lostofothercode: function(){
// lets call it 400 lines of other class functions and whatnot.
},
<!DOCTYPE html>
<!-- heres the trigger (note this single hypen &gt doesn't trigger it)-> -- // anything omg > this should not be -->
<html>
<head><title>b0rken</title></head>
<body>seen</body>
<!-- heres another across multiple lines.
--
lots of stuff inbetween a doublehypen on line 8 and a gt on on line 13. lame.
<!DOCTYPE html>
<html>
<head>
<title>AbstractComparingFactoryThingInterface (or A Simple Dojo Image Comparing Thinger)</title>
<style type="text/css">
p {
font:14px Helvetica Neue,Arial,sans-serif;
}
</style>
@phiggins42
phiggins42 / gist:741572
Created December 15, 2010 03:08
cheney.js
<!DOCTYPE html>
<html>
<head>
<title>AbstractComparingFactoryThingInterface (or A Simple Dojo Image Comparing Thinger)</title>
<style type="text/css">
p {
font:14px Helvetica Neue,Arial,sans-serif;
}
</style>
diff --git a/has.js b/has.js
index 25df969..6624b74 100644
--- a/has.js
+++ b/has.js
@@ -86,6 +86,7 @@ has = (function(g){
return supported;
}
+ // TODO: can we change this to `emptyElement` or some such? clear makes me think css ^ph
function clearElement(el){
dojo.filterObject = function(obj, filterFn, context){
var ret = {}; context = context || window;
for(var i in obj){
if(filterFn.call(context, obj[i], i, obj)){
ret[i] = obj[i];
}
}
return ret;
}

hello testing the color

(function(){
var foo = {
count: 0,
bar: function(it){
this.count++;
}
};
var bar = "bar";
// 1: how could you rewrite the following to make it shorter?
if (foo) {
bar.doSomething(el);
} else {
bar.doSomethingElse(el);
}
<!DOCTYPE html>
<html>
<head>
<title>Dojo x-domain Skeleton</title>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.5/dijit/themes/claro/claro.css">
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.5/dojo/dojo.xd.js"></script>
<script>
dojo.require("dijit.layout.TabContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.form.Button");