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:
@@ -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 */
|
||||
|
||||
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user