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
{{ message }}
This repository has been archived by the owner on Feb 4, 2018. It is now read-only.
If we do this, the heuristic for seeing if it's a selector or HTML needs to be considered. Upon initial inspection, it seems that you can do something like:
// This would match HTMLquery.trim().indexOf('<')===0
The only downsides, which we can't do anything about other than trimming around the string is whitespace inside of the node, which has to match exactly. This can catch you up if you use template literals:
// Matches because trim()mount('<div><span></span></div>').one(` <span></span>`);// Does not match because inner whitespace.// JSX works because it ignores whitespace.mount('<div><span></span></div>').one(` <span> </span>`);
This would probably just need to be emphasised in the docs when documenting this form of the arguments.
The text was updated successfully, but these errors were encountered:
Currently we support HTML in
mount()
but it'd be nice if this was also supported inall()
et al to match that. For example:If we do this, the heuristic for seeing if it's a selector or HTML needs to be considered. Upon initial inspection, it seems that you can do something like:
The only downsides, which we can't do anything about other than trimming around the string is whitespace inside of the node, which has to match exactly. This can catch you up if you use template literals:
This would probably just need to be emphasised in the docs when documenting this form of the arguments.
The text was updated successfully, but these errors were encountered: