Subscribe on changes!

v-html without encapsulating block

avatar
Feb 10th 2021

What problem does this feature solve?

Currently when using v-html both on vue 2 and 3 there must be a block present on which the innerHTML can be set.

Is there way to use v-html without an encapsulating block?

What does the proposed API look like?

<template v-html="myHTML" />

Then perhaps when encountering the above we can find the .parentElement and call.appendChild()?

avatar
Feb 10th 2021

Thank you for your interest, but this is a breaking change and does not seem reasonable. In addition, at this stage, any new features need to go through RFCs. BTW: You can easily implement a custom directive like v-outer-html