$unsafe helper #98
-
To be used inside a x-html directory. It would roughly work in this way -> https://codepen.io/SimoTod/pen/zYoMayv Known limitations:
|
Beta Was this translation helpful? Give feedback.
Answered by
KevinBatdorf
Mar 10, 2021
Replies: 2 comments 4 replies
-
Could this some how work to load in something like this: // external-file.js
<div x-data="myComponent"></div>
<script>
window.myComponent = function() {}
</script> then <div x-data x-html="content.length ? $unsafe(content) : 'loading...'"></div>
// content would be fetched and be the contents of external-file.js Essentially making for an easy way to include partials? |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
SimoTod
-
Maybe we should call it in a different way? $eval? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Could this some how work to load in something like this:
then
Essentially making for an easy way to include partials?