Before axe-core sends information to frameMessanger, it has to serialise DqElements. This method would allow us to customize how elements are serialized. This can be particularly useful for gathering additional data necessary to run certain axe-core plugins. The API would look something like this:
axe.utils.nodeSerializer({
serializeNode: dqElm => magic(dqElm),
combineSpecs: (nodeSpec, frameSpec) => metaMagic(nodeSpec, frameSpec)
})
The serializeNode method would then be called in place of dqElm.toJson(), and combineSpecs would be called in place of DqElement.mergeSpecs(). To unset the nodeSerializer, we can use axe.utils.nodeSerializer(null). That lets us switch between different settings needed for different plugins and runs.
Before axe-core sends information to frameMessanger, it has to serialise DqElements. This method would allow us to customize how elements are serialized. This can be particularly useful for gathering additional data necessary to run certain axe-core plugins. The API would look something like this:
The
serializeNodemethod would then be called in place ofdqElm.toJson(), and combineSpecs would be called in place ofDqElement.mergeSpecs(). To unset the nodeSerializer, we can useaxe.utils.nodeSerializer(null). That lets us switch between different settings needed for different plugins and runs.