I’m attempting to append a script to an iframe within my view. Imagine a split pane view with an editor on one side and live html on the other. Although this is not exactly what I’m trying to do, it is an easier use case to understand.
$(frame).contents().find("body").append("<script>alert('this will fail');</script>")
and I’m running into this error:
Does anyone know or can think of a way to avoid this error without saving files to a temporary directory then loading them via src?
More broadly this issue is similar to this CSP question however it was never properly answered, and I’m not sure the workaround is a long term solution.
I understand why the error is occurring and Chrome has some good info on their CSP for extensions.
Is Atom mostly the same?