Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wasm-watermarker
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nagayama15
wasm-watermarker
Commits
948d2592
Commit
948d2592
authored
May 27, 2019
by
nagayama15
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display result using Vue.js
parent
8b68ba49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
index.html
server/static/index.html
+19
-3
No files found.
server/static/index.html
View file @
948d2592
...
...
@@ -6,17 +6,33 @@
<title>
Watermark Server
</title>
</head>
<body>
<h1>
Watermark Server
</h1>
<div
id=
"root"
>
<h1>
Watermark Server
</h1>
<p>
add2(42, 88) = {{ result1 }}
</p>
<p>
add3(42, 88, 64) = {{ result2 }}
</p>
</div>
<script
src=
"https://unpkg.com/vue"
></script>
<script>
(
async
()
=>
{
// Import wasm module
const
wasm
=
await
WebAssembly
.
instantiateStreaming
(
fetch
(
"wasm/add.wasm"
)
);
const
{
add2
,
add3
}
=
wasm
.
instance
.
exports
;
console
.
log
(
add2
(
42
,
88
));
console
.
log
(
add3
(
42
,
88
,
64
));
// Mount vue
const
data
=
{
result1
:
add2
(
42
,
88
),
result2
:
add3
(
42
,
88
,
64
)
};
const
app
=
new
Vue
({
el
:
"#root"
,
data
});
})();
</script>
</body>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment