<template>
	<view>
		<web-view ref="webView" :src="webUrl" @message="onmessage"></web-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				webUrl: ''
			}
		},
		methods: {
			onmessage(e) {
				console.log(e)
			}
		},
		onReady() {
			// this.$refs.webView.post({
			// 	action: 'injectJS',
			// 	code: "document.addEventListener('DOMContentLoaded', function() { var title = document.title; uni.postMessage({   data: {     type: 'title',     title: title   } });});"
			// })
		}
	}
</script>

<style>

</style>