PSA: MDV Custom Syntax API registration API has changed and MDVSyntax -> ExpressionSyntax

17 views
Skip to first unread message

Rafael Weinstein

unread,
Jun 14, 2013, 6:24:51 PM6/14/13
to polymer-...@googlegroups.com
1. The API for a Custom Syntax is unchanged, but how they are registered is.

-Rather than registering the Syntax globally via

HTMLTemplateElement.syntax['MySyntax'] = MySyntax;

you simply assign it directly to a template element

templateElement.bindingDelegate = MySyntax

2. It is no longer neccesary (or possible) to declare the use of the
syntax like this

<template bind syntax="MySyntax">

If the syntax is registered via bindingDelegate on the template it
will be used and

<template bind>

is sufficient.

Also, src/mdv_syntax.js has been moved to util/expression_syntax.js
(and renamed to ExpressionSyntax) for clarity that there is no intent
to standardize this Syntax.

I've updated the docs:

Syntax API: https://github.com/Polymer/mdv/blob/master/docs/syntax_api.md
Expression Syntax:
https://github.com/Polymer/mdv/blob/master/docs/expression_syntax.md
Reply all
Reply to author
Forward
0 new messages