mirror of
https://git.um-react.app/um/lib_um_crypto_rust.git
synced 2026-03-08 04:29:54 +00:00
[wasm] fix: NCMFile & loader issue
This commit is contained in:
@@ -3,7 +3,7 @@ use umc_ncm::NetEaseCryptoError;
|
||||
use wasm_bindgen::prelude::wasm_bindgen;
|
||||
use wasm_bindgen::JsError;
|
||||
|
||||
/// QMC Footer.
|
||||
/// NCMFile
|
||||
#[wasm_bindgen(js_name=NCMFile)]
|
||||
pub struct JsNCMFile {
|
||||
ncm: Option<NCMFile>,
|
||||
@@ -11,6 +11,12 @@ pub struct JsNCMFile {
|
||||
|
||||
#[wasm_bindgen(js_class=NCMFile)]
|
||||
impl JsNCMFile {
|
||||
/// Create a NCMFile instance
|
||||
#[wasm_bindgen(constructor)]
|
||||
pub fn new() -> Result<JsNCMFile, JsError> {
|
||||
Ok(JsNCMFile { ncm: None })
|
||||
}
|
||||
|
||||
/// Open NCM file.
|
||||
/// If everything is ok, return `0`.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user