session-resume icon indicating copy to clipboard operation
session-resume copied to clipboard

Support `scope:` option to limit resumables

Open seanpdoyle opened this issue 4 years ago • 0 comments

By default, calls to persistResumableFields() will query the document for elements with the (default or provided) selector:.

This commit adds support for specifying a scope: option to declare a ParentNode instance other than the document.

persistResumableFields(getPageID(), {
  scope: document.getElementById("my-scope"),
  selector: ".descendants-of-my-scope",
})

seanpdoyle avatar Dec 12 '21 01:12 seanpdoyle