Skip to content

if target_os = "emscripten" ClipboardContext is not defined and not set to NopClipboardContext; #82

@axkibe

Description

@axkibe

I would be fine for it getting set to Nop, getting the clipboard works very differently in wasm/emscripten and very much out of this scope having to cross the JS/FFI boundary without web-sys available and getting navigator.clipboard.

But, it doesnt get defined at all and that makes the compiler unhappy.

#[cfg(not(any(
unix,
windows,
target_os = "macos",
target_os = "android",
target_os = "ios",
target_os = "emscripten"
)))]
pub type ClipboardContext = nop_clipboard::NopClipboardContext;

I think the condition is mixed up here.

Add this before please (under the TODOs for android and ios)
#[cfg(target_os = "emscripten")]
pub type ClipboardContext = nop_clipboard::NopClipboardContext;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions