fix(ComponentUrlMapper): support relative template URLs in Dartium
When running in Dartium without using transformers (i.e. with a normal static web server), handle relative template URLs. This works by using mirrors to get the URL of the library where the component class is defined. Closes #2771 Closes #3743
This commit is contained in:
@ -10,9 +10,7 @@ class NullReflectionCapabilities implements ReflectionCapabilities {
|
||||
|
||||
_notImplemented(String name) => throw 'Not implemented: $name';
|
||||
|
||||
bool isReflectionEnabled() {
|
||||
return false;
|
||||
}
|
||||
bool isReflectionEnabled() => false;
|
||||
|
||||
Function factory(Type type) => _notImplemented("factory");
|
||||
|
||||
@ -27,6 +25,8 @@ class NullReflectionCapabilities implements ReflectionCapabilities {
|
||||
SetterFn setter(String name) => _nullSetter;
|
||||
|
||||
MethodFn method(String name) => _nullMethod;
|
||||
|
||||
String importUri(Type type) => './';
|
||||
}
|
||||
|
||||
_nullGetter(Object p) => null;
|
||||
|
Reference in New Issue
Block a user