This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use wasm_bindgen::prelude::*; | |
#[wasm_bindgen] | |
extern "C" { | |
pub type HTMLDocument; | |
#[wasm_bindgen(js_namespace = console)] | |
pub fn log(msg: &str); | |
pub static document: HTMLDocument; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Somewhere | |
[ | |
h('input', { | |
placeholder: 'card number', | |
oninput: function (e) {targets.handleCardNumber({number: e.srcElement.value, state: state}) | |
}), | |
h('span', state.get().cardNumberError) | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <MessageUI/MFMailComposeViewController.h> | |
/********** Later... *************/ | |
//link your button up to this | |
- (void) buttonPressed:(id)(sender){ | |
//if their device can send emails | |
if([MFMailComposeViewController canSendMail]){ |