if (foo is Bar) { Bar bar = foo; print(bar.someValue); } js.context.hasProperty('someValue'); if (js.context['document']['someValue'] != null) { // do stuff with js.context['document']['someValue'] } else { // that property doesn't exist }
if (foo is Bar) { Bar bar = foo; print(bar.someValue); } js.context.hasProperty('someValue'); if (js.context['document']['someValue'] != null) { // do stuff with js.context['document']['someValue'] } else { // that property doesn't exist }