The Enter key should serve as the default submit action.
- JS-free only possible through
<form>
and<button type="submit">
?
The Enter key should serve as the default submit action.
<form>
and <button type="submit">
?/* | |
Figuring out how to provide a Backward Compatibility Layer | |
GOALS: | |
[aliasing] provide a function (nextGeneration) in another name (previousGeneration) | |
[parameters] the functions might differ in argument order (or length, …) | |
[warnings] log each access/mutation to the alias (previousGeneration) so old code bases can be cleaned up | |
*/ | |
var myObject = { |
/* | |
Am I missing something here or is this really the way to go for a | |
module's setup function to expose something to the module's tests? | |
*/ | |
(function() { | |
var filled_by_setup; | |
module('dummy module', { | |
setup: function() { | |
// prepare some data | |
filled_by_setup = Math.random(); |
$.ajax = (function(ajax) { | |
return function(url) { | |
if (url instanceof URI) { | |
arguments[0] = arguments[0].toString(); | |
} | |
return ajax.apply($, arguments); | |
}; | |
})($.ajax); |
// Do you prefer alwaysWrapped() or wrappedWhenNeeded() for | |
// a method that depends on some promise being resolved? | |
function FooBar() { | |
this.ready = $.getJSON('something.funky'); | |
} | |
FooBar.prototype.alwaysWrapped = function() { | |
return this.ready.then(function(){ | |
// do something that returns a promise |
We worked on the Number
Object.
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>rawgithub.com gist demo</title> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> | |
<h1>Hello world</h1> |
feedback on iscroll docs:
(formerly "Proposal for Enhanced Keyboard Interaction")
"Abstraction of user interaction by introduction command primitives"
originally I thought this would only mean something to the keyboard. But having an abstract concept of a "command" enables us to access the same actions via keyboard, voice, touch-gesture, etc. Probably the main problem is going to be "context". Which command is applicable to what kind of an element and in which situation is it even possible to execute the action.