2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-13 08:22:26 +03:00

fix: support once (with skip) client side (fix #498)

This commit is contained in:
pimlie
2020-02-26 19:32:19 +01:00
parent 4c03b38cae
commit c74c645d18
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -44,7 +44,10 @@ export default function updateTag (appId, options, type, tags, head, body) {
}
const newElement = document.createElement(type)
newElement.setAttribute(attribute, appId)
if (!tag.once) {
newElement.setAttribute(attribute, appId)
}
Object.keys(tag).forEach((attr) => {
/* istanbul ignore next */
+1 -1
View File
@@ -104,7 +104,7 @@ export const tagsWithInnerContent = ['noscript', 'script', 'style']
// Attributes which are inserted as childNodes instead of HTMLAttribute
export const tagAttributeAsInnerContent = ['innerHTML', 'cssText', 'json']
export const tagProperties = ['once', 'template']
export const tagProperties = ['once', 'skip', 'template']
// Attributes which should be added with data- prefix
export const commonDataAttributes = ['body', 'pbody']