This feature has been deprecated. Use up.render()
or up.navigate()
instead.
Load unpoly-migrate.js
to polyfill deprecated features.
Updates a selector on the current page with the same selector from the given HTML string.
Let's say your current HTML looks like this:
<div class="one">old one</div>
<div class="two">old two</div>
We now replace the second <div>
, using an HTML string
as the source:
html = '<div class="one">new one</div>' +
'<div class="two">new two</div>'
up.extract('.two', html)
Unpoly looks for the selector .two
in the strings and updates its
contents in the current page. The current page now looks like this:
<div class="one">old one</div>
<div class="two">new two</div>
Note how only .two
has changed. The update for .one
was
discarded, since it didn't match the selector.
See options for up.render()
.
A promise that will be fulfilled when the selector was updated.