blob: 57a126473417617019e6112670cec5a3ccc37a46 [file] [log] [blame]
<!DOCTYPE html>
<!--
Copyright 2015 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="/extras/tquery/filter.html">
<polymer-element name='tv-e-tquery-filter-has-title'
extends='tv-e-tquery-filter'>
<script>
'use strict';
Polymer({
ready: function() {
this.expected = undefined;
},
get scriptName() {
return 'hasTitle';
},
get scriptValue() {
return function(expected) {
var filter = document.createElement(this.element.name);
filter.expected = expected;
return filter;
}.bind(this);
},
evaluate: function(context) {
return this.matchValue_(context.event.title, this.expected);
}
});
</script>
</polymer-element>