Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
248 lines (245 sloc) 6.17 KB
#
# Copyright 2016 The AMP HTML Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS-IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the license.
#
tags: { # amp-list
html_format: AMP
tag_name: "SCRIPT"
extension_spec: {
name: "amp-list"
version: "0.1"
version: "latest"
requires_usage: GRANDFATHERED
deprecated_allow_duplicates: true
}
attr_lists: "common-extension-attrs"
}
tags: { # amp-list
html_format: AMP4EMAIL
tag_name: "SCRIPT"
spec_name: "SCRIPT[custom-element=amp-list] (AMP4EMAIL)"
extension_spec: {
name: "amp-list"
version: "0.1"
version: "latest"
}
attr_lists: "common-extension-attrs"
}
tags: { # amp-list
html_format: ACTIONS
tag_name: "SCRIPT"
spec_name: "SCRIPT[custom-element=amp-list] (ACTIONS)"
extension_spec: {
name: "amp-list"
version: "0.1"
version: "latest"
}
attr_lists: "common-extension-attrs"
}
tags: { # <amp-list> with mandatory src and/or [src] attr
html_format: AMP
tag_name: "AMP-LIST"
requires_extension: "amp-list"
attrs: {
name: "auto-resize"
value: ""
deprecation: "replacement-to-be-determined-at-a-later-date"
deprecation_url: "https://github.com/ampproject/amphtml/issues/18849"
}
attrs: {
name: "binding"
value: "always"
value: "no"
value: "refresh"
}
attrs: { name: "credentials" }
attrs: { name: "items" }
attrs: {
name: "load-more"
value: "auto"
value: "manual"
}
attrs: {
name: "load-more-bookmark"
trigger: {
also_requires_attr: "load-more"
}
}
attrs: { name: "max-items" }
attrs: {
name: "reset-on-refresh"
value: ""
value: "always"
value: "fetch"
}
attrs: { name: "single-item" }
attrs: {
name: "src"
mandatory_anyof: "['src','[src]']"
value_url: {
protocol: "https"
allow_relative: true # Will be set to false at a future date.
}
blacklisted_value_regex: "__amp_source_origin"
}
# TODO(gregable): Implement validation that requires the template attr value
# to reference the id of an existing template element.
attrs: { name: "template" }
# <amp-bind>
attrs: {
name: "[is-layout-container]"
}
attrs: {
name: "[src]"
mandatory_anyof: "['src','[src]']"
}
attrs: {
name: "[state]"
deprecation: "[src]"
}
attr_lists: "extended-amp-global"
amp_layout: {
supported_layouts: FILL
supported_layouts: FIXED
supported_layouts: FIXED_HEIGHT
supported_layouts: FLEX_ITEM
supported_layouts: NODISPLAY
supported_layouts: RESPONSIVE
}
}
tags: { # amp-list-load-more
html_format: AMP
html_format: EXPERIMENTAL
tag_name: "AMP-LIST-LOAD-MORE"
requires_extension: "amp-list"
mandatory_parent: "AMP-LIST"
attrs: {
name: "load-more-button"
value: ""
mandatory_oneof: "['load-more-button', 'load-more-failed', 'load-more-end', 'load-more-loading']"
}
attrs: {
name: "load-more-failed"
value: ""
mandatory_oneof: "['load-more-button', 'load-more-failed', 'load-more-end', 'load-more-loading']"
}
attrs: {
name: "load-more-loading"
value: ""
mandatory_oneof: "['load-more-button', 'load-more-failed', 'load-more-end', 'load-more-loading']"
}
attrs: {
name: "load-more-end"
value: ""
mandatory_oneof: "['load-more-button', 'load-more-failed', 'load-more-end', 'load-more-loading']"
}
}
# AMP4EMAIL disallows mustache in src attribute.
tags: { # <amp-list>
html_format: AMP4EMAIL
tag_name: "AMP-LIST"
spec_name: "AMP-LIST (AMP4EMAIL)"
requires_extension: "amp-list"
disallowed_ancestor: "AMP-LIST"
disallowed_ancestor: "AMP-STATE"
disallowed_ancestor: "TEMPLATE"
attrs: { name: "items" }
attrs: { name: "max-items" }
attrs: { name: "single-item" }
attrs: {
name: "src"
mandatory: true
value_url: {
protocol: "https"
allow_relative: false
}
blacklisted_value_regex: "__amp_source_origin|"
"{{|}}" # Mustache is disallowed in src.
}
# TODO(gregable): Implement validation that requires the template attr value
# to reference the id of an existing template element.
attrs: { name: "template" }
# <amp-bind>
attrs: { name: "[state]" }
attr_lists: "extended-amp-global"
amp_layout: {
supported_layouts: FILL
supported_layouts: FIXED
supported_layouts: FIXED_HEIGHT
supported_layouts: FLEX_ITEM
supported_layouts: NODISPLAY
supported_layouts: RESPONSIVE
}
}
# ACTIONS <amp-list> with POST identity token
tags: { # <amp-list>
html_format: ACTIONS
tag_name: "AMP-LIST"
spec_name: "AMP-LIST (ACTIONS)"
requires_extension: "amp-list"
attrs: {
name: "auto-resize"
value: ""
deprecation: "replacement-to-be-determined-at-a-later-date"
deprecation_url: "https://github.com/ampproject/amphtml/issues/18849"
}
attrs: {
name: "binding"
value: "always"
value: "no"
value: "refresh"
}
attrs: { name: "credentials" }
attrs: {
name: "crossorigin"
value: "amp-viewer-auth-token-via-post"
}
attrs: { name: "items" }
attrs: { name: "max-items" }
attrs: {
name: "reset-on-refresh"
value: ""
value: "always"
value: "fetch"
}
attrs: { name: "single-item" }
attrs: {
name: "src"
mandatory_anyof: "['src','[src]']"
value_url: {
protocol: "https"
allow_relative: true
}
blacklisted_value_regex: "__amp_source_origin"
}
attrs: { name: "template" }
# <amp-bind>
attrs: {
name: "[src]"
mandatory_anyof: "['src','[src]']"
}
attrs: {
name: "[state]"
deprecation: "[src]"
}
attr_lists: "extended-amp-global"
amp_layout: {
supported_layouts: FILL
supported_layouts: FIXED
supported_layouts: FIXED_HEIGHT
supported_layouts: FLEX_ITEM
supported_layouts: NODISPLAY
supported_layouts: RESPONSIVE
}
}
You can’t perform that action at this time.