1

I'm using the HttpRequest.getString method to load some content dynamically, which works well until I generate some js from the dart code. Running the generated javascript causes these error "access denied" at this point:

// An uncaught error in the root context terminates all isolates.
    if (identical(this, _globalState.rootContext)) {
      rethrow;
    }

this is the dart code:

void loadPage(String src)
{
  HttpRequest.getString(src).then((response)
  {
    querySelector("#content").innerHtml=response;
  });
}

Where is the problem, and why is the dart code working but not the javascript code?

Cedric Krause
  • 361
  • 1
  • 6
  • 15

1 Answers1

0

You could try setInnerHtml() with a NodeValidator like shown in How to change Element innerHtml to Dart SDK 0.7.1. See also https://groups.google.com/a/dartlang.org/forum/#!topic/misc/kQD2-_hY_DQ

Community
  • 1
  • 1
Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567