Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Op crate for Web APIs #6906

Merged
merged 11 commits into from
Aug 7, 2020
Merged

Conversation

bartlomieju
Copy link
Member

No description provided.

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - I've released this to https://crates.io/crates/deno_web

@ry ry changed the title [WIP] op crate for Web APIs Op crate for Web APIs Aug 6, 2020
@ry
Copy link
Member

ry commented Aug 6, 2020

Is it possible to use something like this in the crate?

pub fn init(isolate: &mut deno_core::CoreIsolate) {
  deno_core::js_check(
    isolate.execute("00_dom_exception.js", include_str!("00_dom_exception.js")),
  );
  deno_core::js_check(
    isolate.execute("01_event.js", include_str!("01_event.js")),
  );
  deno_core::js_check(
    isolate.execute("08_text_encoding.js", include_str!("08_text_encoding.js")),
  );
}

@bartlomieju
Copy link
Member Author

Is it possible to use something like this in the crate?

pub fn init(isolate: &mut deno_core::CoreIsolate) {
  deno_core::js_check(
    isolate.execute("00_dom_exception.js", include_str!("00_dom_exception.js")),
  );
  deno_core::js_check(
    isolate.execute("01_event.js", include_str!("01_event.js")),
  );
  deno_core::js_check(
    isolate.execute("08_text_encoding.js", include_str!("08_text_encoding.js")),
  );
}

Sure, but I'd rather punt on it a bit more. Let's revisit this topic after moving more APIs to this crate.

@ry
Copy link
Member

ry commented Aug 7, 2020

Let’s just leave the duplicated tests for now? I am worried about losing the type checks in them.

@bartlomieju bartlomieju merged commit 41215eb into denoland:master Aug 7, 2020
@bartlomieju bartlomieju deleted the op_crates_web branch August 7, 2020 14:55
@ry ry mentioned this pull request Aug 9, 2020
6 tasks
PaulThompson added a commit to PaulThompson/deno that referenced this pull request Aug 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants