On 2016-10-28 1:01 PM, ysu...@ncsu.edu wrote:
Hi Josh, we are a little bit confused about the last initial step. "Use the newly-added
JS<Element> member to call these new methods as appropriate in each of the stub methods
in ValidityState". We tried to call the function we declared in the trait and try to print
out something when it get called but nothing happened. Can you explain the work flow of this
validation stuff?
The idea here is that:
* ValidityState has a JS<Element> member
* Element has a `as_maybe_validatable` method, that returns
Option<&Validatable>
* Validatable has a method that can perform validations
We can combine these to make each of the stub methods that exist in
ValidityState (ValueMissing, TypeMismatch, etc.) invoke the method on
Validatable. Does that make sense?
Cheers,
Josh
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo