Skip to content

Add JS library - #4

Open
pavel-kuznetsov-hypertrack wants to merge 37 commits into
mainfrom
add-js-library
Open

Add JS library#4
pavel-kuznetsov-hypertrack wants to merge 37 commits into
mainfrom
add-js-library

Conversation

@pavel-kuznetsov-hypertrack

Copy link
Copy Markdown
Contributor

Add JS library wrapper around WebView Java-JS interface for users to be able to properly call HyperTrack SDK from WebView JS code

@ferologics ferologics left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nice progress

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

what sorcery is this?

@pavel-kuznetsov-hypertrack pavel-kuznetsov-hypertrack Dec 22, 2023

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's generated from TS code

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

i suppose these need to be defined still?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Generated code

Comment on lines +215 to +217
const HyperTrack = (function () {
return hyperTrackInstance;
})();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

we need this instance why?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Generated code

Comment on lines +318 to +319
var HyperTrackError;
(function (HyperTrackError) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

i suppose this PR is still wip, the error is already declared elsewhere if I read this correctly

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Generated code

Comment on lines +55 to +68
override fun onPause() {
super.onPause()
webView?.onPause()
}

override fun onResume() {
super.onResume()
webView?.onResume()
}

override fun onDestroy() {
webView?.destroy()
super.onDestroy()
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

why do we sometimes call we view before super and vice versa?

@pavel-kuznetsov-hypertrack pavel-kuznetsov-hypertrack Dec 22, 2023

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We need to destroy the view before everything else is destroyed (I am not sure why, it's just seems to be more correct way)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

yeah i get that, but why not always call the view first before the super then?

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