Amphtml: amp-bind: "Removed unsafe attribute" for binding attributes

Created on 17 Jan 2019  路  3Comments  路  Source: ampproject/amphtml

To whom it may concern:

I use amp-bind in amp-mustache. It works well before. But console will appear the follow message since today (2019-01-17).

Removed unsafe attribute: [class]="'favStore' + ((favStore['Y2655622939']) ? ' favStore--on' : '')"

Here comes my code.

<amp-list
  layout="fill"
  credentials="include"
  items="."
  src="xxxx">
  <template type="amp-mustache">
    <p class="favStore {{#isFollow}}favStore--on{{/isFollow}}" [class]="'favStore' + ((favStore['Y2655622939']) ? ' favStore--on' : '')"></p>
    <em class="bind-insurce" [text]="favStore['Y2655622939']"></em>
  </template>
</amp-list>

I wonder is this an issue or should I need to avoid to do anything ?

Paul

Soon Bug runtime

Most helpful comment

@meistudioli Thanks for the report. Looks like we are wrongly reporting transformed attributes as part of https://github.com/ampproject/amphtml/pull/20285. This should be harmless and things should work as before.

/to @choumx, looks like we should suppress warnings for the amp-bind attributes that get rewritten to data-amp-bind-*

All 3 comments

@meistudioli Thanks for the report. Looks like we are wrongly reporting transformed attributes as part of https://github.com/ampproject/amphtml/pull/20285. This should be harmless and things should work as before.

/to @choumx, looks like we should suppress warnings for the amp-bind attributes that get rewritten to data-amp-bind-*

Yea, this is just an incorrect error message. No changes needed. I'll fix this today.

Thank you.

Was this page helpful?
0 / 5 - 0 ratings