Skip to content

Commit

Permalink
Fix cache check when not developing
Browse files Browse the repository at this point in the history
  • Loading branch information
eliassjogreen committed May 16, 2020
1 parent 4d49c04 commit 99b777a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
4 changes: 1 addition & 3 deletions examples/external.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ await new WebView({
<body>
<h1>asdasdasd</h1>
<script>
onload = () => {
external.invoke("hello from window");
}
external.invoke("hello from window");
</script>
</body>
</html>
Expand Down
2 changes: 1 addition & 1 deletion plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function unwrapResponse<T, R extends WebViewResponse<T>>(response: R): T {

const pluginId = await prepare({
name: "deno_webview",
checkCache: IS_DEV,
checkCache: !IS_DEV,
printLog: IS_DEV,
urls: {
darwin: `${PLUGIN_PATH}/libdeno_webview.dylib`,
Expand Down
13 changes: 5 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
extern crate deno_core;
extern crate futures;
extern crate serde;
extern crate serde_json;
extern crate webview_sys;

use deno_core::plugin_api::Buf;
use deno_core::plugin_api::Interface;
use deno_core::plugin_api::Op;
use deno_core::plugin_api::ZeroCopyBuf;

use futures::future::FutureExt;
use futures::future::poll_fn;

use serde::Deserialize;
use serde::Serialize;

use std::cell::RefCell;
use std::collections::HashMap;
// use std::ffi::CStr;
use std::ffi::CStr;
use std::ffi::CString;
// use std::os::raw::*;
use std::os::raw::*;
use std::ptr::null_mut;

use webview_sys::*;
Expand Down Expand Up @@ -111,6 +106,8 @@ fn op_webview_new(
// extern "C" fn ffi_invoke_handler(webview: *mut CWebView, arg: *const c_char) {
// unsafe {
// let arg = CStr::from_ptr(arg).to_string_lossy().to_string();
//
// println!("{}", arg);
// }
// }

Expand Down

0 comments on commit 99b777a

Please sign in to comment.