1

On this Dart page https://www.dartlang.org/articles/embedding-in-html/ they say:

“No script injection of Dart code. We do not currently support or recommend dynamically injecting a script tag that loads Dart code. Recent browser security trends, like Content Security Policy, actively prevent this practice.”

What do they mean exactly by “No script injection of Dart code”? Can you show me a concrete example?

1 Answer 1

2

I assume this means adding a script tag like

<script src="main.dart" type="application/dart"></script>

imperatively from another Dart script.

Because there is no browser that supports Dart code directly this can't be used in production anyway but I guess it's the same for another <script> tag that loads additional "Dart" code, that was transpiled to JS, dynamically.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.