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')
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 | |
// |
$("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()); | |
}); |
/* 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; |
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); |
git reset --hard <prev_commit_id> | |
git push --force |
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/ |
/* | |
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$/) |
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", | |
} |
Random rd = new Random(); | |
string remote_port = rd.Next(9000, 9999).ToString(); | |
// Open real Chrome | |
Process process = new Process(); | |
process.StartInfo.UseShellExecute = true; | |
process.StartInfo.FileName = "chrome"; | |
process.StartInfo.Arguments = "https://thgiang.com --load-extension=\"C:\\Users\\Admin\\Desktop\\my_extension\" --disable-gpu --new-window --remote-debugging-port=" + remote_port + " --user-data-dir=\"C:\\Profile\" --proxy-server=\""+proxy+"\" --disable-infobars --disable-notifications --window-size=1366,768"; //--window-position=0,0 --window-size=1200,800 --disable-images | |
process.Start(); | |
Thread.Sleep(1000); |