You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In browsers, el.value for an <option> will fallback from getAttribute('value') to the inner content of a node. Since jQuery executes in the browser, it gets this for free when it asks for el.value. However, Cheerio currently does not support this behavior. As a result:
<select><optionselected>Hello</option></select>
$('select').val() will return [undefined] via Cheerio and ['Hello'] via jQuery.
The text was updated successfully, but these errors were encountered:
In browsers,
el.value
for an<option>
will fallback fromgetAttribute('value')
to the inner content of a node. Since jQuery executes in the browser, it gets this for free when it asks forel.value
. However, Cheerio currently does not support this behavior. As a result:$('select').val()
will return[undefined]
via Cheerio and['Hello']
via jQuery.The text was updated successfully, but these errors were encountered: