-
key : primitive (
{name:"foobar"}
) -
key : regex (
{name:/^foo.*?/"}
) -
key : { condition : primitive } (
{age: {gt: 21}}
) -
key : function(key, val) { returns true/false } (would need to be post-process?)
-
key : condition(val) (
{a:gt(10)}
)- Occurred to me this might be better than 3. above.
- Looks nicer/More Flexible/Customizable
This file contains hidden or 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
var MS = function(config) { | |
// Since you won't be mixing in Y.ModelSync.REST | |
// as a separate extensions | |
Y.ModelSync.REST.apply(this, arguments); | |
}; | |
Y.mix(MS, Y.ModelSync.REST); // Mainly to pull over ModelSync.REST.ATTRS, but maybe other stuff also. | |
Y.mix(MS.prototype, Y.ModelSync.REST.prototype); |
This file contains hidden or 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
var MS = function(config) { | |
/* Whatever constructor stuff you wanted. | |
No point chaining, since there's no inheritance, | |
and Y.ModelSync.REST's constructor and initializer | |
will get called by the infrastructure | |
*/ | |
}; |
This file contains hidden or 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
YUI.add("transaction-integration-tests", function(Y, module) { | |
var WAIT_TIMEOUT = Y.BridgeIntegrationTests.WAIT_TIMEOUT, | |
DB_HANDLE_ID, | |
DB_INSTANCE; | |
Y.BridgeIntegrationTests.add(new Y.Test.Case({ | |
id : module, |
This file contains hidden or 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
var EmptyWidget = Y.Base.create('emptyWidget', Y.Widget, [], { | |
_fakeProperty: null, // Not actually required, but since you had it in your orig. code. | |
_fakeObject: null, // Not actually required, but since you had it in your orig. code. | |
initializer : function() { | |
this._fakeProperty = {}; | |
this._fakeObject = {}; | |
}, |
This file contains hidden or 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
See: https://github.com/sdesai/yui3/commit/29f63996f8b69a7bb6d2e27f4d350c320998c0b2#commitcomment-1474176 | |
Mixes Not-Inlined | |
----------------- | |
Chrome 19: | |
Finished. | |
new Base() x 8,147 ops/sec ±2.72% (40 runs sampled) | |
Fire With Payload - 10 listeners x 65,711 ops/sec ±0.37% (57 runs sampled) |
This file contains hidden or 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
suite.add('MyBase with 20 varied attributes, all firing events', function () { | |
var b = new MyBase20(); | |
b.set("attr1", "Bar"); | |
b.set("attr2", "Foo"); | |
b.set("attr3", "Foo"); | |
b.set("attr4", "Foo"); | |
b.set("attr5", "Foo"); | |
b.set("attr6", "Foo"); | |
b.set("attr7", "Foo"); | |
b.set("attr8", "Foo"); |
This file contains hidden or 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
Y: Object | |
Array: function | |
Env: Object | |
Features: Object | |
Get: Object | |
Intl: Object | |
Lang: Object | |
Loader: function | |
Object: function | |
Queue: function |
a) Clean up multi-axis support [ being able to scroll horizontally and vertically at the same time ]. It's currently supported, but doesn't hold up cleanly all the way through the API.
b) Clean up scrollbar implementation - right now the scrollbar is 3 separate elements. I remember looking into it and thinking we could do it with just 1 piece.
c) Just a general high level pass of the API.
d) Clean up the ScrollView-List plugin - it doesn't really solve the real problem it was mean to solve - laying out horizontal LIs. It's API could also use some cleanup.
This file contains hidden or 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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<script src="../../../../build/yui/yui.js"></script> | |
<script src="../../../../build/widget-htmlrenderer/widget-htmlrenderer.js"></script> | |
<style> | |
.yui3-parentwidget { | |
border:1px solid black; |