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')
" Vim color file | |
" Converted from Textmate theme Monokai using Coloration v0.3.2 (http://github.com/sickill/coloration) | |
set background=dark | |
highlight clear | |
if exists("syntax_on") | |
syntax reset | |
endif |
#!/bin/sh | |
# | |
# chkconfig: 2345 55 25 | |
# Description: Openresty init.d script, put in /etc/init.d, chmod +x /etc/init.d/openresty | |
# For Debian, run: update-rc.d -f openresty defaults | |
# For CentOS, run: chkconfig --add openresty | |
# | |
### BEGIN INIT INFO | |
# Provides: openresty | |
# Required-Start: $all |
[Unit] | |
Description=Control headless soffice instance | |
After=network.target xvfb.service | |
Requires=xvfb.service | |
[Service] | |
Type=simple | |
ExecStart=/opt/libreoffice4.4/program/soffice --headless \ | |
--accept=socket,host=127.0.0.1,port=8101;urp; --display :5.0 \ | |
--pidfile=/var/run/soffice.pid --nologo --nodefault --nofirststartwizard |