Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3528)

Unified Diff: chrome/common/extensions/docs/js/api_page_generator.js

Issue 10832363: In the extension docs builder, allow DOM nodes to be specified as "volatile" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/js/api_page_generator.js
diff --git a/chrome/common/extensions/docs/js/api_page_generator.js b/chrome/common/extensions/docs/js/api_page_generator.js
index ee1d51a8644822b78a0c703c7948e459d7e16917..cb5bb82c188bcb7e35450490c7ed0f4a8562695f 100644
--- a/chrome/common/extensions/docs/js/api_page_generator.js
+++ b/chrome/common/extensions/docs/js/api_page_generator.js
@@ -422,9 +422,11 @@ function cleanupJstemplateMess(root) {
// Delete nodes which are hidden. There are lots of these since jsdisplay
// just hides nodes, not deletes them.
- if (n.style && n.style.display === 'none') {
+ if (!n.hasAttribute('volatile') && n.style && n.style.display === 'none') {
displayNone.push(n);
continue;
+ } else {
+ n.removeAttribute('volatile');
}
// Delete empty style attributes (this can happen when jsdisplay causes
« no previous file with comments | « chrome/common/extensions/docs/extensions/samples.html ('k') | chrome/common/extensions/docs/static/samples.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698