我必须在构造函数中调用函数作为从回调工作,我必须包含在构造函数中,但这在构造函数中是“未定义的”。
class XXXXX extends React.Component {
constructor(props) {
super(props);
this.state =
{
chargebeeInstance : windowChargebeeinit({
site: "xxxxxxxxxxxxx-test"})
}
this.statechargebeeInstancesetCheckoutCallbacks(function(){
return{
close:function(){
this.moveToNextStep();
}
}
})
}
moveToNextStep(){
this.props.jumpToNextStep(3);
}
Run Code Online (Sandbox Code Playgroud)
我无法调用 moveToNextStep 因为这是未定义的
AntiXssEncoder.HtmlEncode 仅支持.Net 框架。当我们的应用程序位于 .net core 2.1 中时,我可以使用 WebUtility.HtmlEncode 进行 Antixss 吗?