ShopifyApp.flashErrorがのpostMessageを呼び出しますように見える:だから
e.postMessage = function(e, t) {
var r;
return null == t && (t = {}), r = JSON.stringify({
message: e,
data: t
}),
n("client sent " + r + " to " + this.shopOrigin),
window.parent.postMessage(r, this.shopOrigin),
null != t ? t.callbackId : void 0
}, e.flashNotice = function(e) {
return this.postMessage("Shopify.API.flash.notice", {
message: e
})
}, e.flashError = function(e) {
return this.postMessage("Shopify.API.flash.error", {
message: e
})
}
をあなたができる「Shopify.API.flash.error」に送信されたメッセージを聞いているロジックのビットを見つけることができれば、メッセージをレンダリングするコードを見つけます。しかし、r = JSON.stringify({ message: e, data: t})
の呼び出しでは、改行を呼び出すのに十分な特殊文字を渡す限り、あなたは運がないと思われます。
'flashError'メソッドのソースコードを覗いてみましたか?答えはそこにあるかもしれません。 – Forty3
あなたの提案@ Forty3に感謝します。しかし私は、Shopifyのソースコードにアクセスできないと信じています! – zahra