mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-23 12:20:33 +03:00
Fix issue #67
This commit is contained in:
@@ -19,6 +19,10 @@ new Vue({
|
|||||||
},
|
},
|
||||||
meta: [
|
meta: [
|
||||||
{ name: 'description', content: 'Hello', vmid: 'test' }
|
{ name: 'description', content: 'Hello', vmid: 'test' }
|
||||||
]
|
],
|
||||||
|
script: [
|
||||||
|
{ innerHTML: '{ "@context": "http://www.schema.org", "@type": "Organization" }', type: 'application/ld+json' }
|
||||||
|
],
|
||||||
|
__dangerouslyDisableSanitizers: ['script']
|
||||||
})
|
})
|
||||||
}).$mount('#app')
|
}).$mount('#app')
|
||||||
|
|||||||
@@ -34,10 +34,10 @@ export default function _updateTags (options = {}) {
|
|||||||
|
|
||||||
if (tags && tags.length) {
|
if (tags && tags.length) {
|
||||||
tags.forEach((tag) => {
|
tags.forEach((tag) => {
|
||||||
|
if (type === '__dangerouslyDisableSanitizers') return
|
||||||
const newElement = document.createElement(type)
|
const newElement = document.createElement(type)
|
||||||
|
|
||||||
for (const attr in tag) {
|
for (const attr in tag) {
|
||||||
console.log(type, attribute, attr)
|
|
||||||
if (tag.hasOwnProperty(attr)) {
|
if (tag.hasOwnProperty(attr)) {
|
||||||
if (attr === 'innerHTML') {
|
if (attr === 'innerHTML') {
|
||||||
newElement.innerHTML = tag.innerHTML
|
newElement.innerHTML = tag.innerHTML
|
||||||
|
|||||||
Reference in New Issue
Block a user