Skip to content

Commit

Permalink
Updated string allocations
Browse files Browse the repository at this point in the history
  • Loading branch information
britzl committed May 13, 2021
1 parent 77ad399 commit 1317575
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions webmonetization/lib/web/library_webmonetization.js
Expand Up @@ -15,26 +15,26 @@ var WebMonetizationLibrary = {

document.monetization.addEventListener("", event => {
{{{ makeDynCall("vii", "Context.listener") }}} (
allocate(intArrayFromString("monetizationpending"), "i8", ALLOC_STACK),
allocate(intArrayFromString(JSON.stringify(event.detail !== undefined ? event.detail : {})), "i8", ALLOC_STACK)
allocate(intArrayFromString("monetizationpending"), ALLOC_STACK),
allocate(intArrayFromString(JSON.stringify(event.detail !== undefined ? event.detail : {})), ALLOC_STACK)
);
});
document.monetization.addEventListener("monetizationstart", event => {
{{{ makeDynCall("vii", "Context.listener") }}} (
allocate(intArrayFromString("monetizationstart"), "i8", ALLOC_STACK),
allocate(intArrayFromString(JSON.stringify(event.detail !== undefined ? event.detail : {})), "i8", ALLOC_STACK)
allocate(intArrayFromString("monetizationstart"), ALLOC_STACK),
allocate(intArrayFromString(JSON.stringify(event.detail !== undefined ? event.detail : {})), ALLOC_STACK)
);
});
document.monetization.addEventListener("monetizationprogress", event => {
{{{ makeDynCall("vii", "Context.listener") }}} (
allocate(intArrayFromString("monetizationprogress"), "i8", ALLOC_STACK),
allocate(intArrayFromString(JSON.stringify(event.detail !== undefined ? event.detail : {})), "i8", ALLOC_STACK)
allocate(intArrayFromString("monetizationprogress"), ALLOC_STACK),
allocate(intArrayFromString(JSON.stringify(event.detail !== undefined ? event.detail : {})), ALLOC_STACK)
);
});
document.monetization.addEventListener("monetizationstop", event => {
{{{ makeDynCall("vii", "Context.listener") }}} (
allocate(intArrayFromString("monetizationstop"), "i8", ALLOC_STACK),
allocate(intArrayFromString(JSON.stringify(event.detail !== undefined ? event.detail : {})), "i8", ALLOC_STACK)
allocate(intArrayFromString("monetizationstop"), ALLOC_STACK),
allocate(intArrayFromString(JSON.stringify(event.detail !== undefined ? event.detail : {})), ALLOC_STACK)
);
});
},
Expand Down

0 comments on commit 1317575

Please sign in to comment.