Skip to content

Commit

Permalink
Rename to StrictBindingParser
Browse files Browse the repository at this point in the history
  • Loading branch information
TimvdLippe committed Feb 25, 2018
1 parent d8cf449 commit 19d4b8c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,14 @@
/**
* Mixin that parses binding expressions and generates corresponding metadata.
* The implementation is different than in `property-effects`, as it uses a
* state machine instead of a regex.
* state machine instead of a regex. As such, this implementation is able to
* handle more cases, with the potential performance hit.
*
* @namespace
* @memberof Polymer
* @summary Mixin that parses binding expressions and generates corresponding metadata.
*/
const BindingParser = Polymer.dedupingMixin((base) => {
const StrictBindingParser = Polymer.dedupingMixin((base) => {

return class extends base {

Expand Down Expand Up @@ -399,6 +400,6 @@
};
});

Polymer.BindingParser = BindingParser;
Polymer.StrictBindingParser = StrictBindingParser;
})();
</script>
8 changes: 4 additions & 4 deletions test/unit/property-effects-elements.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<link rel="import" href="../../lib/utils/binding-parser.html">
<link rel="import" href="../../lib/utils/strict-binding-parser.html">
<dom-module id="x-basic">
<template>
<div id="boundChild"
Expand Down Expand Up @@ -332,10 +332,10 @@
});

HTMLImports.whenReady(() => {
class XBasicWithBindingParser extends Polymer.BindingParser(customElements.get('x-basic')) {
static get is() { return 'x-basic-binding-parser'; }
class XBasicWithStrictBindingParser extends Polymer.StrictBindingParser(customElements.get('x-basic')) {
static get is() { return 'x-basic-strict-binding-parser'; }
}
customElements.define(XBasicWithBindingParser.is, XBasicWithBindingParser);
customElements.define(XBasicWithStrictBindingParser.is, XBasicWithStrictBindingParser);
});
</script>
</dom-module>
Expand Down
4 changes: 2 additions & 2 deletions test/unit/property-effects.html
Original file line number Diff line number Diff line change
Expand Up @@ -420,10 +420,10 @@
});
});

suite('can work with binding parser', function() {
suite('can work with strict binding parser', function() {
setup(function() {
document.body.removeChild(el);
el = document.createElement('x-basic-binding-parser');
el = document.createElement('x-basic-strict-binding-parser');
document.body.appendChild(el);
});

Expand Down

0 comments on commit 19d4b8c

Please sign in to comment.