-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for bind expressions in mustache templates #7602
Conversation
@@ -698,4 +766,29 @@ export class Bind { | |||
|
|||
return false; | |||
} | |||
|
|||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OOC, did you try the suggestion above before using polling?
extensions/amp-bind/0.1/bind-impl.js
Outdated
* removes bindings for removed elements, then immediately applies the current | ||
* scope to the new bindings. | ||
* | ||
* Meant to be used with MutationObserver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: This comment is obvious and can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
}); | ||
|
||
it('should NOT bind blacklisted attributes', () => { | ||
env.sandbox.restore(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this necessary? Sandbox stubs/mocks/etc. should generally only be restored at the end of unit test execution, otherwise it can make the unit test harder to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beforeEach
sets canBind and isResultValid to always return true. In this test I need those methods to use their real implementation. This should probably be moved over to the integration tests once those are merged in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional: It's probably better to be precise and restore()
the individual stubs rather than the entire sandbox.
Please add a TODO to move this to the integration test.
extensions/amp-bind/0.1/bind-impl.js
Outdated
}).then(() => { | ||
this.digest_(); | ||
}); | ||
this.mutationPromises_.push(mutationPromise); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want mutationPromise
to wait for digest_()
to complete? If so, it should return this.digest_();
to chain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
*/ | ||
this.digestQueuedAfterScan_ = false; | ||
this.mutationPromises_ = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this array ever cleaned up in production? If it's only used for testing, you can document it as such and add if (getMode().test)
guards as I suggested elsewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
src/sanitizer.js
Outdated
/* Attributes added for amp-bind */ | ||
// TODO(kmh287): Add more whitelisted attributes for bind? | ||
'text', | ||
'class', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this result in <p text="foo" class="bar">
being valid (in addition to [text]
and [class]
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably harmless, though only whitelisting the amp-bind attributes [text]
and [class]
would avoid the need for validating the value of class
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interestingly enough, running the new test on master shows that the sanitizer allows the class attribute and allows values that match the blacklisted regex. I've removed class
from the whitelist.
.equal('<p>hello</p>'); | ||
}); | ||
|
||
it('should NOT output security-sensitive amp-bind attributes', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test that makes sure we disallow templating inside amp-bind's brackets, e.g. <a [{{foo}}]="javascript:alert(1)">
, where foo
== "href".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought, this test should live in the extension validator -- feel free to do this in a follow-up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
attrValue && | ||
/(^|\W)i-amphtml-/i.test(attrValue)) { | ||
return false; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not ideal since we're duping that regex again. Please add a link to the validator protoascii in a comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can drop this now, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jridgewell I'm not sure what you mean. Could you explain? Before these changes, the sanitizer didn't sanitize the class
attribute and did allow assignment to values that match the regex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, I guess this check is not strictly necessary for this PR after all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't allow the class
attribute, since we dropped it from WHITELISTED_ATTRS
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like Caja doesn't blacklist class
in the first place. Tried this on https://validator.ampproject.org/ and it works.
}); | ||
|
||
it('should NOT bind blacklisted attributes', () => { | ||
env.sandbox.restore(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional: It's probably better to be precise and restore()
the individual stubs rather than the entire sandbox.
Please add a TODO to move this to the integration test.
src/sanitizer.js
Outdated
/* Attributes added for amp-bind */ | ||
// TODO(kmh287): Add more whitelisted attributes for bind? | ||
'text', | ||
'class', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably harmless, though only whitelisting the amp-bind attributes [text]
and [class]
would avoid the need for validating the value of class
.
test/functional/test-timer.js
Outdated
}); | ||
setTimeout(() => { | ||
predicate = true; | ||
}, 222); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we reduce these values to make the test run faster?
extensions/amp-bind/0.1/bind-impl.js
Outdated
@@ -99,11 +100,19 @@ export class Bind { | |||
/** @const @private {!../../../src/service/resources-impl.Resources} */ | |||
this.resources_ = resourcesForDoc(ampdoc); | |||
|
|||
if (getMode().test) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd only check this around the push
operation below.
extensions/amp-bind/0.1/bind-impl.js
Outdated
* Array to keep track of mutations during testing | ||
* @const @private {!Array<Promise>} | ||
*/ | ||
this.mutationPromises_ = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mutationPromisesForTesting_
would be self-documenting. Sorry should've clarified that in my last comment.
@@ -698,4 +766,29 @@ export class Bind { | |||
|
|||
return false; | |||
} | |||
|
|||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional.
5c4b5fb
to
08f7956
Compare
@@ -186,9 +190,19 @@ export function sanitizeHtml(html) { | |||
} | |||
return; | |||
} | |||
const bindAttribsIndices = map(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be cheaper to just do?
const bindAttribsIndices = [];
bindAttribsIndices[i] = true;
if (bindAttribsIndices[i]) {
...
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I started with. Will recommended I use an object instead, and then Justin recommended using map.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I'll defer to them then. A got a bit put off by map[String(i)]
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hasOwn
isn't necessary if we use a map, just bindAttribsIndices[i]
will be sufficient to test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@kmh287 one suggestion, but otherwise lg on my side. |
fca0a59
to
60b86f3
Compare
Thanks everyone |
* initial setup for extension nexxtv-player * added nexxtv player logic * nexxtv player bugfixes, cleanup, tests, docs * added video interface, changed attribute start to seek-to * reworked video interface for nexxtv-player * added message handler for nexxtv player and tests * nexxtv player minor fixes & cleanup * nexxtv player changed indents from 4 spaces to 2 * added unlayoutCallback for nexxtv player * initial setup for extension nexxtv-player * added nexxtv player logic * nexxtv player bugfixes, cleanup, tests, docs * added video interface, changed attribute start to seek-to * reworked video interface for nexxtv-player * added message handler for nexxtv player and tests * nexxtv player minor fixes & cleanup * nexxtv player changed indents from 4 spaces to 2 * added unlayoutCallback for nexxtv player * fixed linting issues (#7673) * initial setup for extension nexxtv-player * added nexxtv player logic * nexxtv player bugfixes, cleanup, tests, docs * added video interface, changed attribute start to seek-to * reworked video interface for nexxtv-player * added message handler for nexxtv player and tests * nexxtv player minor fixes & cleanup * nexxtv player changed indents from 4 spaces to 2 * added unlayoutCallback for nexxtv player * initial setup for extension nexxtv-player * added nexxtv player logic * nexxtv player bugfixes, cleanup, tests, docs * added video interface, changed attribute start to seek-to * reworked video interface for nexxtv-player * added message handler for nexxtv player and tests * nexxtv player minor fixes & cleanup * fixed linting issues (#7673) * nexxtv player review fixes (#7816) * nexxtv player: updated validation rules (#7816) * nexxtv player validator ordered alphabetical, changed spec_url * fire amp-dom-update event on insert and replace (#7819) * temp * trigger `amp-dom-update` event on insert and replace * switch -amp-form to i-amp-form * Validator Rollup (#7844) * Revision bump. * Revision bump for amp-playbuzz changes in #7450 * Revision bump. * Allow filtering by HtmlFormat (AMP, AMP4ADS) in the code generator. * Revision bump. * Revision bump due to Github pull. * Code generation now driven by a variable LIGHT, which is broader than the previous GENERATE_DETAILED_ERRORS distinction. LIGHT implies filtered for specific format (AMP or AMP4ADS, and only amp.validator.validateSaxEvents, and no detailed errors. * Generate ValidatorRules.directAttrLists and globalAttrs and ampLayoutAttrs, reducing overhead by indirection. * Implement parallax effect extension (#7794) * Do not set hidden attribute on hide/collapse (#7879) * amp-bind: Support `Math` functions (#7797) * initial commit for Math in amp-bind * fix lint * ali's comment * avoid scope conflicts with built-in functions * remove Math functions from documentation * Measure 3P ad latency (#7902) * Update spec URLs from github to ampproject. (#7901) * Update github urls to ampproject urls * test .out updated * Too many slashes. * Moved Developing.md and Design_Principles.md (#7908) * Rename DEVELOPING.md to contributing/DEVELOPING.md * Move files to new folder * Renaming toggle to toggleVisibility because it was conflicting with sidebar and breaking it (#7855) * disable scrollRestoration auto for embed case (#7899) * Disable Fast Fetch for all ads when remote.html is used. (#7906) * Fix DoubleClick Fast Fetch bugs around categoryExclusions and tagForChildDirectedTreatment (#7843) * Fix incorrect parameter name for `tagForChildDirectedTreatment` in DoubleClick. * Added unit test for tagForChildDirectedTreatment. * Fixed the categoryExclusions bug in Fast Fetch DoubleClick. * Removed parens in arrow functions to satisfy linter * Adds two new experiment IDs (#7850) * Adds two new experiment IDs to distinguish "any externally triggered" experiment from "any internally triggered". Also updates tests to remove a number of assumptions that only a single eid will be populated. * Use return val to detect "externally selected"; test updates. * Updated network implementation guide. (#7862) * Updated network impl guide. * Changed 'validation' to 'verification' * Cid timeout error should not be dev error (#7911) * Fix amp-ad test (#7918) * Update amp-install-serviceworker.md (#7932) Fully escape javascript regex. * Update amp-cache-modifications.md (#7933) Add `data-no-service-worker-fallback-shell-url` as a URL to be rewritten as absolute. * amp-fx-parallax Don't use global (#7942) * Viewer integration: rewrite error message to indicate request name (#7923) * rewrite error message * update * ticks * Fix up links in DEVELOPING.md (#7944) We moved DEVELOPING.md to the contributing folder but didn't update many of the relative links accordingly. * Popin ad extension document updated. (#7674) * Add popin ad extension. * register popin. * Add resizeable attribute. * Remove resizable. * Implemented the render-start and no-content APIs. * Fixed lint. * Remove quatation. * Use [email protected] * Rebase old commit . * Fixed document because tag was not closed. * I replaced the removed double quotes. * Add double quotes. * Support for bind expressions in mustache templates (#7602) * first pass at adding/removing subtrees * tests passing * Add ability to add and remove bindings in the subtree rooted at a specific node * lint fixes * merge conflict * ci issues * some cleanup * pr comments * pr comments, new method of removing bindings for node and its children * fix some lint warnings * test and lint fixes * mutation observer * update comments * add observer * naive implementation * cleanup * clean * cleanup bind impl * very simple example of bind in a template * pr comments * lint errors * pr comments * cleanup * lint errors * pr comments * pr comments and lint warnings * typo * comments * more lint warnings * pr comment * change README * cleanup * pr comments * pr comments 2 * lint warnings * don't use foreach on Nodelist * casting * more ci warnings * even more ci warnings * even more ci warnings * even more ci issues * even more ci comments * even more ci issues * pr comments * more pr comments * fix refactoring oversight * pr comments * pr comments * merge * pr comments * ci issues * pr comments * assertElement * pr comments * typo * updating sanitizer * fixing up sanitizer test * pr comments * pr comments * expanded on amp-mustache tests * pr comments * remove class from whitelist * restore whole sandbox * update mustache validator test and output * pr comments * nexxtv player gulp check-types fixes (#7816) * nexxtv player fix error gulp presumbit with postmessage (#7816) * added dependency check for nexxtv player (#7816) * nexxtv player minor fix in validator (#7816) * nexxtv player fixed validator (#7816) * fixed validator (#7816)
* first pass at adding/removing subtrees * tests passing * Add ability to add and remove bindings in the subtree rooted at a specific node * lint fixes * merge conflict * ci issues * some cleanup * pr comments * pr comments, new method of removing bindings for node and its children * fix some lint warnings * test and lint fixes * mutation observer * update comments * add observer * naive implementation * cleanup * clean * cleanup bind impl * very simple example of bind in a template * pr comments * lint errors * pr comments * cleanup * lint errors * pr comments * pr comments and lint warnings * typo * comments * more lint warnings * pr comment * change README * cleanup * pr comments * pr comments 2 * lint warnings * don't use foreach on Nodelist * casting * more ci warnings * even more ci warnings * even more ci warnings * even more ci issues * even more ci comments * even more ci issues * pr comments * more pr comments * fix refactoring oversight * pr comments * pr comments * merge * pr comments * ci issues * pr comments * assertElement * pr comments * typo * updating sanitizer * fixing up sanitizer test * pr comments * pr comments * expanded on amp-mustache tests * pr comments * remove class from whitelist * restore whole sandbox * update mustache validator test and output * pr comments
* initial setup for extension nexxtv-player * added nexxtv player logic * nexxtv player bugfixes, cleanup, tests, docs * added video interface, changed attribute start to seek-to * reworked video interface for nexxtv-player * added message handler for nexxtv player and tests * nexxtv player minor fixes & cleanup * nexxtv player changed indents from 4 spaces to 2 * added unlayoutCallback for nexxtv player * initial setup for extension nexxtv-player * added nexxtv player logic * nexxtv player bugfixes, cleanup, tests, docs * added video interface, changed attribute start to seek-to * reworked video interface for nexxtv-player * added message handler for nexxtv player and tests * nexxtv player minor fixes & cleanup * nexxtv player changed indents from 4 spaces to 2 * added unlayoutCallback for nexxtv player * fixed linting issues (ampproject#7673) * initial setup for extension nexxtv-player * added nexxtv player logic * nexxtv player bugfixes, cleanup, tests, docs * added video interface, changed attribute start to seek-to * reworked video interface for nexxtv-player * added message handler for nexxtv player and tests * nexxtv player minor fixes & cleanup * nexxtv player changed indents from 4 spaces to 2 * added unlayoutCallback for nexxtv player * initial setup for extension nexxtv-player * added nexxtv player logic * nexxtv player bugfixes, cleanup, tests, docs * added video interface, changed attribute start to seek-to * reworked video interface for nexxtv-player * added message handler for nexxtv player and tests * nexxtv player minor fixes & cleanup * fixed linting issues (ampproject#7673) * nexxtv player review fixes (ampproject#7816) * nexxtv player: updated validation rules (ampproject#7816) * nexxtv player validator ordered alphabetical, changed spec_url * fire amp-dom-update event on insert and replace (ampproject#7819) * temp * trigger `amp-dom-update` event on insert and replace * switch -amp-form to i-amp-form * Validator Rollup (ampproject#7844) * Revision bump. * Revision bump for amp-playbuzz changes in ampproject#7450 * Revision bump. * Allow filtering by HtmlFormat (AMP, AMP4ADS) in the code generator. * Revision bump. * Revision bump due to Github pull. * Code generation now driven by a variable LIGHT, which is broader than the previous GENERATE_DETAILED_ERRORS distinction. LIGHT implies filtered for specific format (AMP or AMP4ADS, and only amp.validator.validateSaxEvents, and no detailed errors. * Generate ValidatorRules.directAttrLists and globalAttrs and ampLayoutAttrs, reducing overhead by indirection. * Implement parallax effect extension (ampproject#7794) * Do not set hidden attribute on hide/collapse (ampproject#7879) * amp-bind: Support `Math` functions (ampproject#7797) * initial commit for Math in amp-bind * fix lint * ali's comment * avoid scope conflicts with built-in functions * remove Math functions from documentation * Measure 3P ad latency (ampproject#7902) * Update spec URLs from github to ampproject. (ampproject#7901) * Update github urls to ampproject urls * test .out updated * Too many slashes. * Moved Developing.md and Design_Principles.md (ampproject#7908) * Rename DEVELOPING.md to contributing/DEVELOPING.md * Move files to new folder * Renaming toggle to toggleVisibility because it was conflicting with sidebar and breaking it (ampproject#7855) * disable scrollRestoration auto for embed case (ampproject#7899) * Disable Fast Fetch for all ads when remote.html is used. (ampproject#7906) * Fix DoubleClick Fast Fetch bugs around categoryExclusions and tagForChildDirectedTreatment (ampproject#7843) * Fix incorrect parameter name for `tagForChildDirectedTreatment` in DoubleClick. * Added unit test for tagForChildDirectedTreatment. * Fixed the categoryExclusions bug in Fast Fetch DoubleClick. * Removed parens in arrow functions to satisfy linter * Adds two new experiment IDs (ampproject#7850) * Adds two new experiment IDs to distinguish "any externally triggered" experiment from "any internally triggered". Also updates tests to remove a number of assumptions that only a single eid will be populated. * Use return val to detect "externally selected"; test updates. * Updated network implementation guide. (ampproject#7862) * Updated network impl guide. * Changed 'validation' to 'verification' * Cid timeout error should not be dev error (ampproject#7911) * Fix amp-ad test (ampproject#7918) * Update amp-install-serviceworker.md (ampproject#7932) Fully escape javascript regex. * Update amp-cache-modifications.md (ampproject#7933) Add `data-no-service-worker-fallback-shell-url` as a URL to be rewritten as absolute. * amp-fx-parallax Don't use global (ampproject#7942) * Viewer integration: rewrite error message to indicate request name (ampproject#7923) * rewrite error message * update * ticks * Fix up links in DEVELOPING.md (ampproject#7944) We moved DEVELOPING.md to the contributing folder but didn't update many of the relative links accordingly. * Popin ad extension document updated. (ampproject#7674) * Add popin ad extension. * register popin. * Add resizeable attribute. * Remove resizable. * Implemented the render-start and no-content APIs. * Fixed lint. * Remove quatation. * Use [email protected] * Rebase old commit . * Fixed document because tag was not closed. * I replaced the removed double quotes. * Add double quotes. * Support for bind expressions in mustache templates (ampproject#7602) * first pass at adding/removing subtrees * tests passing * Add ability to add and remove bindings in the subtree rooted at a specific node * lint fixes * merge conflict * ci issues * some cleanup * pr comments * pr comments, new method of removing bindings for node and its children * fix some lint warnings * test and lint fixes * mutation observer * update comments * add observer * naive implementation * cleanup * clean * cleanup bind impl * very simple example of bind in a template * pr comments * lint errors * pr comments * cleanup * lint errors * pr comments * pr comments and lint warnings * typo * comments * more lint warnings * pr comment * change README * cleanup * pr comments * pr comments 2 * lint warnings * don't use foreach on Nodelist * casting * more ci warnings * even more ci warnings * even more ci warnings * even more ci issues * even more ci comments * even more ci issues * pr comments * more pr comments * fix refactoring oversight * pr comments * pr comments * merge * pr comments * ci issues * pr comments * assertElement * pr comments * typo * updating sanitizer * fixing up sanitizer test * pr comments * pr comments * expanded on amp-mustache tests * pr comments * remove class from whitelist * restore whole sandbox * update mustache validator test and output * pr comments * nexxtv player gulp check-types fixes (ampproject#7816) * nexxtv player fix error gulp presumbit with postmessage (ampproject#7816) * added dependency check for nexxtv player (ampproject#7816) * nexxtv player minor fix in validator (ampproject#7816) * nexxtv player fixed validator (ampproject#7816) * fixed validator (ampproject#7816)
* first pass at adding/removing subtrees * tests passing * Add ability to add and remove bindings in the subtree rooted at a specific node * lint fixes * merge conflict * ci issues * some cleanup * pr comments * pr comments, new method of removing bindings for node and its children * fix some lint warnings * test and lint fixes * mutation observer * update comments * add observer * naive implementation * cleanup * clean * cleanup bind impl * very simple example of bind in a template * pr comments * lint errors * pr comments * cleanup * lint errors * pr comments * pr comments and lint warnings * typo * comments * more lint warnings * pr comment * change README * cleanup * pr comments * pr comments 2 * lint warnings * don't use foreach on Nodelist * casting * more ci warnings * even more ci warnings * even more ci warnings * even more ci issues * even more ci comments * even more ci issues * pr comments * more pr comments * fix refactoring oversight * pr comments * pr comments * merge * pr comments * ci issues * pr comments * assertElement * pr comments * typo * updating sanitizer * fixing up sanitizer test * pr comments * pr comments * expanded on amp-mustache tests * pr comments * remove class from whitelist * restore whole sandbox * update mustache validator test and output * pr comments
* initial setup for extension nexxtv-player * added nexxtv player logic * nexxtv player bugfixes, cleanup, tests, docs * added video interface, changed attribute start to seek-to * reworked video interface for nexxtv-player * added message handler for nexxtv player and tests * nexxtv player minor fixes & cleanup * nexxtv player changed indents from 4 spaces to 2 * added unlayoutCallback for nexxtv player * initial setup for extension nexxtv-player * added nexxtv player logic * nexxtv player bugfixes, cleanup, tests, docs * added video interface, changed attribute start to seek-to * reworked video interface for nexxtv-player * added message handler for nexxtv player and tests * nexxtv player minor fixes & cleanup * nexxtv player changed indents from 4 spaces to 2 * added unlayoutCallback for nexxtv player * fixed linting issues (ampproject#7673) * initial setup for extension nexxtv-player * added nexxtv player logic * nexxtv player bugfixes, cleanup, tests, docs * added video interface, changed attribute start to seek-to * reworked video interface for nexxtv-player * added message handler for nexxtv player and tests * nexxtv player minor fixes & cleanup * nexxtv player changed indents from 4 spaces to 2 * added unlayoutCallback for nexxtv player * initial setup for extension nexxtv-player * added nexxtv player logic * nexxtv player bugfixes, cleanup, tests, docs * added video interface, changed attribute start to seek-to * reworked video interface for nexxtv-player * added message handler for nexxtv player and tests * nexxtv player minor fixes & cleanup * fixed linting issues (ampproject#7673) * nexxtv player review fixes (ampproject#7816) * nexxtv player: updated validation rules (ampproject#7816) * nexxtv player validator ordered alphabetical, changed spec_url * fire amp-dom-update event on insert and replace (ampproject#7819) * temp * trigger `amp-dom-update` event on insert and replace * switch -amp-form to i-amp-form * Validator Rollup (ampproject#7844) * Revision bump. * Revision bump for amp-playbuzz changes in ampproject#7450 * Revision bump. * Allow filtering by HtmlFormat (AMP, AMP4ADS) in the code generator. * Revision bump. * Revision bump due to Github pull. * Code generation now driven by a variable LIGHT, which is broader than the previous GENERATE_DETAILED_ERRORS distinction. LIGHT implies filtered for specific format (AMP or AMP4ADS, and only amp.validator.validateSaxEvents, and no detailed errors. * Generate ValidatorRules.directAttrLists and globalAttrs and ampLayoutAttrs, reducing overhead by indirection. * Implement parallax effect extension (ampproject#7794) * Do not set hidden attribute on hide/collapse (ampproject#7879) * amp-bind: Support `Math` functions (ampproject#7797) * initial commit for Math in amp-bind * fix lint * ali's comment * avoid scope conflicts with built-in functions * remove Math functions from documentation * Measure 3P ad latency (ampproject#7902) * Update spec URLs from github to ampproject. (ampproject#7901) * Update github urls to ampproject urls * test .out updated * Too many slashes. * Moved Developing.md and Design_Principles.md (ampproject#7908) * Rename DEVELOPING.md to contributing/DEVELOPING.md * Move files to new folder * Renaming toggle to toggleVisibility because it was conflicting with sidebar and breaking it (ampproject#7855) * disable scrollRestoration auto for embed case (ampproject#7899) * Disable Fast Fetch for all ads when remote.html is used. (ampproject#7906) * Fix DoubleClick Fast Fetch bugs around categoryExclusions and tagForChildDirectedTreatment (ampproject#7843) * Fix incorrect parameter name for `tagForChildDirectedTreatment` in DoubleClick. * Added unit test for tagForChildDirectedTreatment. * Fixed the categoryExclusions bug in Fast Fetch DoubleClick. * Removed parens in arrow functions to satisfy linter * Adds two new experiment IDs (ampproject#7850) * Adds two new experiment IDs to distinguish "any externally triggered" experiment from "any internally triggered". Also updates tests to remove a number of assumptions that only a single eid will be populated. * Use return val to detect "externally selected"; test updates. * Updated network implementation guide. (ampproject#7862) * Updated network impl guide. * Changed 'validation' to 'verification' * Cid timeout error should not be dev error (ampproject#7911) * Fix amp-ad test (ampproject#7918) * Update amp-install-serviceworker.md (ampproject#7932) Fully escape javascript regex. * Update amp-cache-modifications.md (ampproject#7933) Add `data-no-service-worker-fallback-shell-url` as a URL to be rewritten as absolute. * amp-fx-parallax Don't use global (ampproject#7942) * Viewer integration: rewrite error message to indicate request name (ampproject#7923) * rewrite error message * update * ticks * Fix up links in DEVELOPING.md (ampproject#7944) We moved DEVELOPING.md to the contributing folder but didn't update many of the relative links accordingly. * Popin ad extension document updated. (ampproject#7674) * Add popin ad extension. * register popin. * Add resizeable attribute. * Remove resizable. * Implemented the render-start and no-content APIs. * Fixed lint. * Remove quatation. * Use [email protected] * Rebase old commit . * Fixed document because tag was not closed. * I replaced the removed double quotes. * Add double quotes. * Support for bind expressions in mustache templates (ampproject#7602) * first pass at adding/removing subtrees * tests passing * Add ability to add and remove bindings in the subtree rooted at a specific node * lint fixes * merge conflict * ci issues * some cleanup * pr comments * pr comments, new method of removing bindings for node and its children * fix some lint warnings * test and lint fixes * mutation observer * update comments * add observer * naive implementation * cleanup * clean * cleanup bind impl * very simple example of bind in a template * pr comments * lint errors * pr comments * cleanup * lint errors * pr comments * pr comments and lint warnings * typo * comments * more lint warnings * pr comment * change README * cleanup * pr comments * pr comments 2 * lint warnings * don't use foreach on Nodelist * casting * more ci warnings * even more ci warnings * even more ci warnings * even more ci issues * even more ci comments * even more ci issues * pr comments * more pr comments * fix refactoring oversight * pr comments * pr comments * merge * pr comments * ci issues * pr comments * assertElement * pr comments * typo * updating sanitizer * fixing up sanitizer test * pr comments * pr comments * expanded on amp-mustache tests * pr comments * remove class from whitelist * restore whole sandbox * update mustache validator test and output * pr comments * nexxtv player gulp check-types fixes (ampproject#7816) * nexxtv player fix error gulp presumbit with postmessage (ampproject#7816) * added dependency check for nexxtv player (ampproject#7816) * nexxtv player minor fix in validator (ampproject#7816) * nexxtv player fixed validator (ampproject#7816) * fixed validator (ampproject#7816)
Bind will rescan mustache templates for bindings every time they change.