Hello everyone
I'm currently working on a project with MapViewer i saw that Arcade can display HTML but i wonder why does frame, iframe and script tags are always deleted
var body = `<p style='font-family: Arial; text-align: center'>test</p><script>alert('test');</script>`
return { type: 'text', text: body }
Like for instance, this code should trigger the browser "alert" function but, here's what MapViewer display:
<div>
<p style="font-family:Arial; text-align:center;">test</p>
</div>
And it do the same for iframe, frame, etc...
Is there any way to force MapViewer to handle script or iframes ?
It would allow to do so much more than just Arcade himself
Looking in the Esri developer doc, I found this page: https://doc.arcgis.com/en/arcgis-online/reference/supported-html.htm
Basically, they explain that few tags are available, so tags like 'style', 'script', and others are simply removed from the page.
That's pretty sad when you consider how useful scripts and styles would be.
Like defining a style for all contextual menus, or allowing more complex manipulation of contextual menus...
Perhaps in a future update