diff --git a/src/polymer-expressions.js b/src/polymer-expressions.js index 11448d3..1cf52ea 100644 --- a/src/polymer-expressions.js +++ b/src/polymer-expressions.js @@ -384,6 +384,19 @@ PolymerExpressions.filters = Object.create(null); + PolymerExpressions.filters.tokenList = function() { + return { + toDOM: function(value) { + var tokens = []; + for (var key in value) { + if (value[key]) + tokens.push(key); + } + return tokens.join(' '); + } + }; + }; + PolymerExpressions.prototype = { prepareBinding: function(pathString, name, node) { if (Path.get(pathString).valid) diff --git a/tests/tests.js b/tests/tests.js index 831962a..2dc15a8 100644 --- a/tests/tests.js +++ b/tests/tests.js @@ -127,7 +127,7 @@ suite('PolymerExpressions', function() { test('ClassName Singular', function() { var div = createTestHtml( - '