The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.
Send messages to iframe using iframeEl.contentWindow.postMessage
Recieve messages using window.addEventListener('message')
// | |
// AurusViewController.m | |
// AurusPayment | |
// | |
// Created by Gaurav D. Sharma on 06/09/22. | |
// | |
// | |
// replace <subdomain_provided_by_aurus>,<MerchantIdentifier>,<StoreId>,<TerminalId>,<AlternatePaymentMatrix>,<CorpID> with given credential | |
// use card details: 4111 1111 1111 1111, any future expire, any security code, any cardholder name | |
// debug WKWebKit => Safari -> Develop -> Simulator -> Open page |
//node A.js > output.txt | |
// If Rabbit had any custom properties on it | |
// (or static properties as some call it), they would not be copied, you'd have to do that manually using getOwnPropertyNames | |
// ref: https://stackoverflow.com/a/9267343/1084917 | |
// See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyNames | |
// var oldProto = Rabbit.prototype; | |
// Rabbit = function() {...}; | |
// Rabbit.prototype = oldProto; |
<html> | |
<head> | |
<style> | |
html, | |
body { | |
width: 100%; | |
height: 100%; | |
margin: 0; | |
} |
/* | |
|-------------------------------------------------------------------------- | |
| AdonisJs Server | |
|-------------------------------------------------------------------------- | |
| | |
| node adonis5Index.js | |
| | |
*/ | |
require('reflect-metadata') |
/* eslint-disable no-console */ | |
import { register } from "register-service-worker"; | |
if (process.env.NODE_ENV === "production") { | |
register(`${process.env.BASE_URL}service-worker.js`, { | |
registrationOptions: { scope: './' }, | |
ready() { | |
console.log("App is being served from cache by a service worker. For more details, visit https://goo.gl/AFskqB"); | |
}, |
//node version < 15 | |
if (!String.prototype.replaceAll) { | |
String.prototype.replaceAll = function (str, newStr) { | |
// If a regex pattern | |
if (Object.prototype.toString.call(str).toLowerCase() === '[object regexp]') { | |
return this.replace(str, newStr); | |
} | |
// If a string | |
return this.split(str).join(newStr); |
{ | |
"dependencies": { | |
"mongodb": "^4.6.0", | |
"mysql2": "^2.3.3" | |
} | |
} |
{ | |
"rates": { | |
"0": { | |
"full": 0, | |
"half": 0 | |
}, | |
"5": { | |
"full": 5, | |
"half": 2.50 | |
}, |
git clone https://github.com/faberchri/fast-data-dev.git
cd fast-data-dev
docker build -t faberchri/fast-data-dev .
Finally run docker-compose up -d
and it will working fine on apple M1 chip.