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
By now just id and class attributes will be triggered. data-* or similar attributes will not get triggered.
Suggested options:
triggerClassAttributes - for triggering JUST class attributes
triggerIdAttributes - for triggering JUST id attributes
Types: <Array|RegExp>
Definition:
If, e.g. triggerClassAttributes has the value [/data-*/, 'my-custom-attribute'], then all data attributes and the my-custom-attribute will get triggered and the content inside will get replaced by just the set class selectors.
Example:
constrcs=require('rcs-core');// first set the id to replacercs.selectorLibrary.set('.my-class');constreplacedHtml=rcs.replace.html(` <div> <element class="my-class" data-anything="my-class" my-custom-attribute="my-class" any-attribute="my-class" /> </div>`);// outputs following:// <div>// <element// class="a"// data-anything="a"// my-custom-attribute="a"// any-attribute="my-class" <-- stays the same// />// </div>
The text was updated successfully, but these errors were encountered:
(ref: #52)
By now just
id
andclass
attributes will be triggered.data-*
or similar attributes will not get triggered.Suggested options:
triggerClassAttributes
- for triggering JUST class attributestriggerIdAttributes
- for triggering JUST id attributesTypes:
<Array|RegExp>
Definition:
If, e.g.
triggerClassAttributes
has the value[/data-*/, 'my-custom-attribute']
, then alldata
attributes and themy-custom-attribute
will get triggered and the content inside will get replaced by just the set class selectors.Example:
The text was updated successfully, but these errors were encountered: