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')
| declare module 'neo-blessed' { | |
| // Base event types | |
| export type BlessedEventHandler = (args?: any) => void; | |
| export type KeyEventHandler = (ch?: string, key?: { name: string; full: string; sequence: string; ctrl: boolean; meta: boolean; shift: boolean }) => void; | |
| export type MouseEventHandler = (data: { x: number; y: number; action: string }) => void; | |
| // Base node options | |
| export interface NodeOptions { | |
| screen?: Screen; | |
| parent?: Node; |
| import { LedgerEthereumClient, Web3ProviderEngine as ProviderEngine } from '@0x/subproviders/lib/src'; // https://github.com/0xProject/0x-monorepo/issues/1400 | |
| import { LedgerSubprovider } from '@0x/subproviders/lib/src/subproviders/ledger'; // https://github.com/0xProject/0x-monorepo/issues/1400 | |
| import CacheSubprovider from 'web3-provider-engine/subproviders/cache'; | |
| import Eth from '@ledgerhq/hw-app-eth'; | |
| import TransportWebUSB from '@ledgerhq/hw-transport-webusb'; | |
| export enum LedgerDerivationPath { | |
| 'Legacy' = "44'/60'/0'", | |
| 'LedgerLive' = "44'/60'/0'/0", | |
| } |
| /* | |
| Autoload all current vue files as component and register them by their name. | |
| --- | |
| Author: Gkiokan Sali | |
| Date: 2019-05-09 | |
| */ | |
| import Vue from 'vue' | |
| const requireContext = require.context('./', false, /.*\.vue$/) |
| v-model uses the @input event by default, so if you want to use v-model on a custom component you need to emit the input event to the parent. So, in your component, you simply do: | |
| <input class="product_name form-control" @input="$emit('input', $event.target.value)" /> | |
| Now in your parent you can do: | |
| <products-list v-model="product.name"></products-list> | |
| You can see the full example on this JSFiddle: https://jsfiddle.net/7s2ugt11/ |
| git reset --hard <prev_commit_id> | |
| git push --force |
| axios.put(this.apiBaseEndpoint + '/' + id, input) | |
| .then((response) => { | |
| // Success | |
| }) | |
| .catch((error) => { | |
| // Error | |
| if (error.response) { | |
| // The request was made and the server responded with a status code | |
| // that falls out of the range of 2xx | |
| // console.log(error.response.data); |
| /* styles for '...' */ | |
| .block-with-text { | |
| /* hide text if it more than N lines */ | |
| overflow: hidden; | |
| /* for set '...' in absolute position */ | |
| position: relative; | |
| /* use this value to count block height */ | |
| line-height: 1.2em; | |
| /* max-height = line-height (1.2) * lines max number (3) */ | |
| max-height: 3.6em; |
| $("p, h1, h2, h3, h4, h5, span").each(function() { | |
| $(this).on("mouseenter", function() { | |
| $(this).css("background-color", "#F1A9A2"); | |
| $(this).on("mouseleave", function() { | |
| $(this).css("background-color", ""); | |
| }); | |
| }); | |
| $(this).on("click", function() { | |
| console.log($(this).text()); | |
| }); |
| function onEdit() { | |
| // Re: https://productforums.google.com/d/topic/docs/gnrD6_XtZT0/discussion | |
| // | |
| // This script prevents cells from being updated. When a user edits a cell on any sheet, | |
| // it is checked against the same cell on a helper sheet, and: | |
| // | |
| // - if the value on the helper sheet is empty, the new value is stored on both sheets | |
| // - if the value on the helper sheet is not empty, it is copied back to the cell on | |
| // the source sheet, undoing the change | |
| // |