Prevent access to certain libraries in dart

90 Views Asked by At

Is there a way to prevent access to certain libraries in dart? The reason why is I want to allow a scripting language in my application. It looked like dart would make that easy, by just limiting what libraries one could import and defining my own libraries. Is this a viable option? For example, I would want to completely remove access to dart:html so that why the scripts can't mess with the DOM.

1

There are 1 best solutions below

0
On

There was a discussion recently about this feature request https://code.google.com/p/dart/issues/detail?id=16373 This is for isolates spawned from Dart code.

I don't know about it when hosting Dart in your application.

See also this question Embedding Dart into application