Adding simple bounds check on InlineStyleInvalidated events

Temporary fix. Better logic should be in place to handle this.

Fixes #44
This commit is contained in:
Kenneth Shaw 2017-03-28 06:59:28 +07:00
parent 3892722188
commit 8eb44961e2

View File

@ -601,6 +601,10 @@ func (h *TargetHandler) domEvent(ctxt context.Context, ev interface{}) {
id, op = e.NodeID, attributeRemoved(e.Name)
case *dom.EventInlineStyleInvalidated:
if len(e.NodeIDs) == 0 {
return
}
id, op = e.NodeIds[0], inlineStyleInvalidated(e.NodeIds[1:])
case *dom.EventCharacterDataModified: