This commit adds a check that the design object used for rsvp of a stimulus only modifies properties of that stimulus and produces and error if that isn't the case.
This is consistent with the existing behaviour of .updateRSVP() but prevents a design object being assigned to the rsvp that tries to modify some other plugin. At present that is possible, but leads to a) an error at runtime when .updateRSVP() tries to update a property that doesn't exist, or
b) incorrect, but silent, modification of the current stimulus' property if it happens to match the name of the property of the other plugin named in the spec.
Both outcomes are clearly undesirable.
This commit adds a check that the design object used for rsvp of a stimulus only modifies properties of that stimulus and produces and error if that isn't the case.
This is consistent with the existing behaviour of .updateRSVP() but prevents a design object being assigned to the rsvp that tries to modify some other plugin. At present that is possible, but leads to a) an error at runtime when .updateRSVP() tries to update a property that doesn't exist, or b) incorrect, but silent, modification of the current stimulus' property if it happens to match the name of the property of the other plugin named in the spec. Both outcomes are clearly undesirable.