Skip to content
This repository was archived by the owner on Jan 4, 2021. It is now read-only.

Commit 0bdd997

Browse files
committed
[FIX] Examples for Edge
1 parent bd27698 commit 0bdd997

File tree

12 files changed

+148
-164
lines changed

12 files changed

+148
-164
lines changed

analysis.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8837,7 +8837,7 @@
88378837
{
88388838
"name": "configuration",
88398839
"type": "Object | null | undefined",
8840-
"description": "Set the additional configuration used to feed MyScript Editor (Structure of object as defined in MyScriptJS DefaultConfiguration.js file)\nConfiguration values are taken into account when myscript-common-element is attach to the dom and when detached is set to false.\nConfiguration values are not reflected to myscript-common-element attributes plus attributes values are always taken into account before configuration values (see demo/programmatic_init.html for a better understanding).",
8840+
"description": "Set the additional configuration used to feed MyScript Editor (Structure of object as defined in MyScriptJS DefaultConfiguration.js file)\nConfiguration values are taken into account when myscript-common-element is attached to the dom and when detached is set to false.\nConfiguration values are not reflected to myscript-common-element attributes plus attributes values are always taken into account before configuration values (see demo/programmatic_init.html for a better understanding).",
88418841
"privacy": "public",
88428842
"sourceRange": {
88438843
"start": {
@@ -13383,7 +13383,7 @@
1338313383
},
1338413384
{
1338513385
"name": "configuration",
13386-
"description": "Set the additional configuration used to feed MyScript Editor (Structure of object as defined in MyScriptJS DefaultConfiguration.js file)\nConfiguration values are taken into account when myscript-common-element is attach to the dom and when detached is set to false.\nConfiguration values are not reflected to myscript-common-element attributes plus attributes values are always taken into account before configuration values (see demo/programmatic_init.html for a better understanding).",
13386+
"description": "Set the additional configuration used to feed MyScript Editor (Structure of object as defined in MyScriptJS DefaultConfiguration.js file)\nConfiguration values are taken into account when myscript-common-element is attached to the dom and when detached is set to false.\nConfiguration values are not reflected to myscript-common-element attributes plus attributes values are always taken into account before configuration values (see demo/programmatic_init.html for a better understanding).",
1338713387
"sourceRange": {
1338813388
"start": {
1338913389
"line": 296,

build/docs/analysis.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8837,7 +8837,7 @@
88378837
{
88388838
"name": "configuration",
88398839
"type": "Object | null | undefined",
8840-
"description": "Set the additional configuration used to feed MyScript Editor (Structure of object as defined in MyScriptJS DefaultConfiguration.js file)\nConfiguration values are taken into account when myscript-common-element is attach to the dom and when detached is set to false.\nConfiguration values are not reflected to myscript-common-element attributes plus attributes values are always taken into account before configuration values (see demo/programmatic_init.html for a better understanding).",
8840+
"description": "Set the additional configuration used to feed MyScript Editor (Structure of object as defined in MyScriptJS DefaultConfiguration.js file)\nConfiguration values are taken into account when myscript-common-element is attached to the dom and when detached is set to false.\nConfiguration values are not reflected to myscript-common-element attributes plus attributes values are always taken into account before configuration values (see demo/programmatic_init.html for a better understanding).",
88418841
"privacy": "public",
88428842
"sourceRange": {
88438843
"start": {
@@ -13383,7 +13383,7 @@
1338313383
},
1338413384
{
1338513385
"name": "configuration",
13386-
"description": "Set the additional configuration used to feed MyScript Editor (Structure of object as defined in MyScriptJS DefaultConfiguration.js file)\nConfiguration values are taken into account when myscript-common-element is attach to the dom and when detached is set to false.\nConfiguration values are not reflected to myscript-common-element attributes plus attributes values are always taken into account before configuration values (see demo/programmatic_init.html for a better understanding).",
13386+
"description": "Set the additional configuration used to feed MyScript Editor (Structure of object as defined in MyScriptJS DefaultConfiguration.js file)\nConfiguration values are taken into account when myscript-common-element is attached to the dom and when detached is set to false.\nConfiguration values are not reflected to myscript-common-element attributes plus attributes values are always taken into account before configuration values (see demo/programmatic_init.html for a better understanding).",
1338713387
"sourceRange": {
1338813388
"start": {
1338913389
"line": 296,

build/docs/myscript-math-web.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ class MyScriptMathWeb extends PolymerElement {
305305

306306
/**
307307
* Set the additional configuration used to feed MyScript Editor (Structure of object as defined in MyScriptJS DefaultConfiguration.js file)
308-
* Configuration values are taken into account when myscript-common-element is attach to the dom and when detached is set to false.
308+
* Configuration values are taken into account when myscript-common-element is attached to the dom and when detached is set to false.
309309
* Configuration values are not reflected to myscript-common-element attributes plus attributes values are always taken into account before configuration values (see demo/programmatic_init.html for a better understanding).
310310
*/
311311
configuration: {
Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
11
<!DOCTYPE html><html lang="en"><head>
2-
<!-- Those meta make the capture of handwriting inputs easier on mobile devices -->
3-
<meta charset="UTF-8">
4-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
5-
<meta name="apple-mobile-web-app-capable" content="yes">
6-
<meta name="mobile-web-app-capable" content="yes">
7-
<meta name="HandheldFriendly" content="true">
2+
<!-- Those meta make the capture of handwriting inputs easier on mobile devices -->
3+
<meta charset="UTF-8">
4+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
5+
<meta name="apple-mobile-web-app-capable" content="yes">
6+
<meta name="mobile-web-app-capable" content="yes">
7+
<meta name="HandheldFriendly" content="true">
88

9-
<title>Get statistics</title>
9+
<title>Get statistics</title>
1010

11-
<link rel="stylesheet" href="../examples.css">
11+
<link rel="stylesheet" href="../examples.css">
1212

13-
<script src="../../../../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
14-
<script type="module" src="../../../../node_modules/@polymer/paper-toast/paper-toast.js"></script>
15-
<script type="module" src="../../../../myscript-math-web.js"></script>
16-
</head>
13+
<script src="../../../../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
14+
<script type="module" src="../../../../myscript-math-web.js"></script>
15+
</head>
1716

18-
<body>
19-
<paper-toast id="result" class="fit-top"></paper-toast>
20-
<!-- Please change applicationkey and hmackey below with those send by mail during your registration. You can re-access them by connecting to your dashboard at developer.myscript.com with your myscript account -->
21-
<myscript-math-web scheme="https" host="webdemoapi.myscript.com" applicationkey="515131ab-35fa-411c-bb4d-3917e00faf60" hmackey="54b2ca8a-6752-469d-87dd-553bb450e9ad" touch-action="none">
22-
</myscript-math-web>
23-
<script>const paperToast = document.querySelector('paper-toast');
17+
<body>
18+
<!-- Please change applicationkey and hmackey below with those send by mail during your registration. You can re-access them by connecting to your dashboard at developer.myscript.com with your myscript account -->
19+
<myscript-math-web scheme="https" host="webdemoapi.myscript.com" applicationkey="515131ab-35fa-411c-bb4d-3917e00faf60" hmackey="54b2ca8a-6752-469d-87dd-553bb450e9ad" touch-action="none">
20+
</myscript-math-web>
21+
<div class="toast"></div>
22+
<script>const toast = document.querySelector('.toast');
2423
document.querySelector('myscript-math-web').addEventListener('changed', event => {
25-
paperToast.text = `Stats for this input are : ${JSON.stringify(event.target.getStats())}`;
26-
paperToast.fitIn = paperToast.show();
24+
toast.textContent = `Stats for this input are : ${JSON.stringify(event.target.getStats())}`;
2725
});</script>
28-
26+
2927

3028
</body></html>
Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,46 @@
11
<!DOCTYPE html><html lang="en"><head>
2-
<!-- Those meta make the capture of handwriting inputs easier on mobile devices -->
3-
<meta charset="UTF-8">
4-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
5-
<meta name="apple-mobile-web-app-capable" content="yes">
6-
<meta name="mobile-web-app-capable" content="yes">
7-
<meta name="HandheldFriendly" content="true">
2+
<!-- Those meta make the capture of handwriting inputs easier on mobile devices -->
3+
<meta charset="UTF-8">
4+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
5+
<meta name="apple-mobile-web-app-capable" content="yes">
6+
<meta name="mobile-web-app-capable" content="yes">
7+
<meta name="HandheldFriendly" content="true">
88

9-
<title>Custom controls</title>
9+
<title>Custom controls</title>
1010

11-
<link rel="stylesheet" href="../examples.css">
12-
<style>
13-
nav {
14-
padding: 0 12px;
15-
line-height: 52px;
16-
}
11+
<link rel="stylesheet" href="../examples.css">
12+
<style>
13+
nav {
14+
padding: 0 12px;
15+
line-height: 52px;
16+
}
1717

18-
myscript-math-web {
19-
height: calc(100% - 52px);
20-
}
21-
</style>
18+
myscript-math-web {
19+
height: calc(100% - 52px);
20+
}
21+
</style>
2222

23-
<script src="../../../../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
24-
<script type="module" src="../../../../node_modules/@polymer/paper-toast/paper-toast.js"></script>
25-
<script type="module" src="../../../../myscript-math-web.js"></script>
26-
</head>
23+
<script src="../../../../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
24+
<script type="module" src="../../../../myscript-math-web.js"></script>
25+
</head>
2726

28-
<body>
29-
<nav>
30-
<button class="classic-btn" onclick="myscriptMathWeb.undo()">undo</button>
31-
<button class="classic-btn" onclick="myscriptMathWeb.redo()">redo</button>
32-
<button class="classic-btn" onclick="myscriptMathWeb.clear()">clear</button>
33-
<button class="classic-btn" onclick="myscriptMathWeb.export_()">export</button>
34-
<button class="classic-btn" onclick="myscriptMathWeb.convert()">convert</button>
35-
</nav>
36-
<paper-toast class="fit-top"></paper-toast>
37-
<!-- Please change applicationkey and hmackey below with those send by mail during your registration. You can re-access them by connecting to your dashboard at developer.myscript.com with your myscript account -->
38-
<myscript-math-web scheme="https" host="webdemoapi.myscript.com" applicationkey="515131ab-35fa-411c-bb4d-3917e00faf60" hmackey="54b2ca8a-6752-469d-87dd-553bb450e9ad" ondemand="" disablecontrols="" touch-action="none">
39-
</myscript-math-web>
40-
<script>const myscriptMathWeb = document.querySelector('myscript-math-web');
41-
const paperToast = document.querySelector('paper-toast');
27+
<body>
28+
<nav>
29+
<button class="classic-btn" onclick="myscriptMathWeb.undo()">undo</button>
30+
<button class="classic-btn" onclick="myscriptMathWeb.redo()">redo</button>
31+
<button class="classic-btn" onclick="myscriptMathWeb.clear()">clear</button>
32+
<button class="classic-btn" onclick="myscriptMathWeb.export_()">export</button>
33+
<button class="classic-btn" onclick="myscriptMathWeb.convert()">convert</button>
34+
</nav>
35+
<!-- Please change applicationkey and hmackey below with those send by mail during your registration. You can re-access them by connecting to your dashboard at developer.myscript.com with your myscript account -->
36+
<myscript-math-web scheme="https" host="webdemoapi.myscript.com" applicationkey="515131ab-35fa-411c-bb4d-3917e00faf60" hmackey="54b2ca8a-6752-469d-87dd-553bb450e9ad" ondemand="" disablecontrols="" touch-action="none">
37+
</myscript-math-web>
38+
<div class="toast"></div>
39+
<script>const myscriptMathWeb = document.querySelector('myscript-math-web');
40+
const toast = document.querySelector('.toast');
4241
myscriptMathWeb.addEventListener('exported', event => {
43-
paperToast.text = `Recognition object contains : ${JSON.stringify(event.detail)}`;
44-
paperToast.fitIn = paperToast.show();
42+
toast.textContent = `Recognition object contains : ${JSON.stringify(event.detail)}`;
4543
});</script>
46-
44+
4745

4846
</body></html>

build/docs/src/demo-app/examples/non-version-specific/handle_error.html

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,19 @@
77
<meta name="HandheldFriendly" content="true">
88

99
<title>Handle error</title>
10+
<link rel="stylesheet" href="../examples.css">
1011

1112
<script src="../../../../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
12-
<script type="module" src="../../../../node_modules/@polymer/paper-toast/paper-toast.js"></script>
1313
<script type="module" src="../../../../myscript-math-web.js"></script>
14-
<link rel="stylesheet" href="../examples.css">
1514
</head>
1615

1716
<body>
18-
<paper-toast class="fit-top"></paper-toast>
1917
<myscript-math-web host="webdemoapi.myscript.com" applicationkey="WRONG">
2018
</myscript-math-web>
21-
<script>const paperToast = document.querySelector('paper-toast');
19+
<div class="toast"></div>
20+
<script>const toast = document.querySelector('.toast');
2221
document.querySelector('myscript-math-web').addEventListener('error', function (event) {
23-
paperToast.text = `Error : ${JSON.stringify(event)}`;
24-
paperToast.fitIn = paperToast.show();
22+
toast.textContent = `Error : ${JSON.stringify(event)}`;
2523
});</script>
2624

2725

build/docs/src/demo-app/examples/non-version-specific/handle_exports.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,17 @@
1111
<link rel="stylesheet" href="../examples.css">
1212

1313
<script src="../../../../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
14-
<script type="module" src="../../../../node_modules/@polymer/paper-toast/paper-toast.js"></script>
1514
<script type="module" src="../../../../myscript-math-web.js"></script>
1615
</head>
1716

1817
<body>
19-
<paper-toast class="fit-top"></paper-toast>
2018
<!-- Please change applicationkey and hmackey below with those send by mail during your registration. You can re-access them by connecting to your dashboard at developer.myscript.com with your myscript account -->
2119
<myscript-math-web scheme="https" host="webdemoapi.myscript.com" applicationkey="515131ab-35fa-411c-bb4d-3917e00faf60" hmackey="54b2ca8a-6752-469d-87dd-553bb450e9ad" mimetypes="[&quot;application/x-latex&quot;]" touch-action="none">
2220
</myscript-math-web>
23-
<script>const paperToast = document.querySelector('paper-toast');
21+
<div class="toast"></div>
22+
<script>const toast = document.querySelector('.toast');
2423
document.querySelector('myscript-math-web').addEventListener('exported', function (event) {
25-
paperToast.text = `Recognition object contains : ${JSON.stringify(event.detail)}`;
26-
paperToast.fitIn = paperToast.show();
24+
toast.textContent = `Recognition object contains : ${JSON.stringify(event.detail)}`;
2725
});</script>
2826

2927

myscript-math-web.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ class MyScriptMathWeb extends PolymerElement {
291291
},
292292
/**
293293
* Set the additional configuration used to feed MyScript Editor (Structure of object as defined in MyScriptJS DefaultConfiguration.js file)
294-
* Configuration values are taken into account when myscript-common-element is attach to the dom and when detached is set to false.
294+
* Configuration values are taken into account when myscript-common-element is attached to the dom and when detached is set to false.
295295
* Configuration values are not reflected to myscript-common-element attributes plus attributes values are always taken into account before configuration values (see demo/programmatic_init.html for a better understanding).
296296
*/
297297
configuration: {
Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,37 @@
11
<!DOCTYPE html>
22
<html lang="en">
33

4-
<head>
5-
<!-- Those meta make the capture of handwriting inputs easier on mobile devices -->
6-
<meta charset="UTF-8">
7-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
8-
<meta name="apple-mobile-web-app-capable" content="yes">
9-
<meta name="mobile-web-app-capable" content="yes">
10-
<meta name="HandheldFriendly" content="true"/>
4+
<head>
5+
<!-- Those meta make the capture of handwriting inputs easier on mobile devices -->
6+
<meta charset="UTF-8">
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
8+
<meta name="apple-mobile-web-app-capable" content="yes">
9+
<meta name="mobile-web-app-capable" content="yes">
10+
<meta name="HandheldFriendly" content="true"/>
1111

12-
<title>Get statistics</title>
12+
<title>Get statistics</title>
1313

14-
<link rel="stylesheet" href="../examples.css">
14+
<link rel="stylesheet" href="../examples.css">
1515

16-
<script src="../../../../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
17-
<script type="module" src="../../../../node_modules/@polymer/paper-toast/paper-toast.js"></script>
18-
<script type="module" src="../../../../myscript-math-web.js"></script>
19-
</head>
16+
<script src="../../../../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
17+
<script type="module" src="../../../../myscript-math-web.js"></script>
18+
</head>
2019

21-
<body>
22-
<paper-toast id="result" class="fit-top"></paper-toast>
23-
<!-- Please change applicationkey and hmackey below with those send by mail during your registration. You can re-access them by connecting to your dashboard at developer.myscript.com with your myscript account -->
24-
<myscript-math-web scheme="https"
25-
host="webdemoapi.myscript.com"
26-
applicationkey="515131ab-35fa-411c-bb4d-3917e00faf60"
27-
hmackey="54b2ca8a-6752-469d-87dd-553bb450e9ad"
28-
touch-action="none">
29-
</myscript-math-web>
30-
<script>
31-
const paperToast = document.querySelector('paper-toast');
32-
document.querySelector('myscript-math-web').addEventListener('changed', (event) => {
33-
paperToast.text = `Stats for this input are : ${JSON.stringify(event.target.getStats())}`;
34-
paperToast.fitIn = paperToast.show();
35-
});
20+
<body>
21+
<!-- Please change applicationkey and hmackey below with those send by mail during your registration. You can re-access them by connecting to your dashboard at developer.myscript.com with your myscript account -->
22+
<myscript-math-web scheme="https"
23+
host="webdemoapi.myscript.com"
24+
applicationkey="515131ab-35fa-411c-bb4d-3917e00faf60"
25+
hmackey="54b2ca8a-6752-469d-87dd-553bb450e9ad"
26+
touch-action="none">
27+
</myscript-math-web>
28+
<div class="toast"></div>
29+
<script>
30+
const toast = document.querySelector('.toast');
31+
document.querySelector('myscript-math-web').addEventListener('changed', (event) => {
32+
toast.textContent = `Stats for this input are : ${JSON.stringify(event.target.getStats())}`;
33+
});
3634
</script>
37-
</body>
35+
</body>
3836

3937
</html>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy