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

Commit 7c2c3e9

Browse files
committed
fix: use the correct render function name
1 parent 9fc060d commit 7c2c3e9

File tree

3 files changed

+6
-79
lines changed

3 files changed

+6
-79
lines changed

public/index.html

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@
33
<head>
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1" />
6-
<title>A widget example!</title>
6+
<title>A calculator widget</title>
77
<script src="https://unpkg.com/[email protected]/umd/react.production.min.js"></script>
88
<script src="https://unpkg.com/[email protected]/umd/react-dom.production.min.js"></script>
9-
<script src="https://unpkg.com/[email protected]/dist/react-intl.production.min.js"></script>
109
</head>
1110
<body>
1211
<section class="section">
1312
<div class="container">
14-
<h1 class="title">Widget Example</h1>
13+
<h1 class="title">Widget Calculator</h1>
1514
<p class="subtitle">
1615
This is an example of a web page that
1716
<strong>contains a widget</strong>!
@@ -103,11 +102,11 @@ <h1 class="title">Widget Example</h1>
103102
document.loadWidgets([
104103
{
105104
instanceId: 'example-calculator',
106-
language: 'es',
105+
language: null,
107106
onRenderFinish: (domElement) =>
108107
console.debug('The widget has finished rendering: ', domElement),
109-
origin: 'https://js-widgets.github.io',
110-
renderFunctionName: 'renderExampleWidget',
108+
origin: null,
109+
renderFunctionName: 'renderExampleCalculator',
111110
},
112111
]);
113112
</script>

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ function render(instanceId, langCode, origin, cb) {
2525
serviceWorker.unregister();
2626
}
2727

28-
window.renderExampleWidget = render;
28+
window.renderExampleCalculator = render;

widget-development.md

Lines changed: 0 additions & 72 deletions
This file was deleted.

0 commit comments

Comments
 (0)