Skip to content

Commit

Permalink
fix: various code issues (#2679)
Browse files Browse the repository at this point in the history
* fix typos

* remove redundant unused code

* update deprecated 'substr' to 'substring'

* Fix invalid code
  • Loading branch information
OnkarRuikar authored Dec 4, 2023
1 parent b19bd87 commit c877595
Show file tree
Hide file tree
Showing 18 changed files with 27 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
<ol>
<li>Mimas</li>
<li>Enceladus</li>
<ol>
<li>Voyager</li>
<li>Cassini</li>
</ol>
<li>
<ol>
<li>Voyager</li>
<li>Cassini</li>
</ol>
</li>
<li>Tethys</li>
</ol>
</li>
Expand Down
7 changes: 1 addition & 6 deletions live-examples/css-examples/masking/mask-type.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@
<div id="output" class="output large hidden">
<section id="default-example" class="default-example">
<img class="box" src="/media/examples/balloon-small.jpg" />
<svg
version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="0"
height="0">
<svg xmlns="http://www.w3.org/2000/svg" width="0" height="0">
<defs>
<mask id="example-element" maskContentUnits="objectBoundingBox">
<rect x=".1" y=".1" width=".8" height=".8" fill="red" fill-opacity="0.5" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
width: 150px;
height: 150px;
margin: 20px;
width: 150px;
background-image: linear-gradient(
50deg,
rgb(77, 26, 103),
Expand Down
2 changes: 1 addition & 1 deletion live-examples/html-examples/content-sectioning/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<h1>Beagles</h1>
<time>08.12.2014</time>
</header>
<p>I love beagles <em>so</em> much! Like, really, a lot. They’re adorable and their ears are so, so snuggly soft!</p>
<p>I love beagles <em>so</em> much! Like, really, a lot. They’re adorable and their ears are so, so snugly soft!</p>
</article>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<label for="picture">Take a picture of your face:</label>
<label for="selfie">Take a picture of your face:</label>

<input type="file" name="picture" accept="image/*" capture="user" />
<input type="file" id="selfie" name="selfie" accept="image/*" capture="user" />

<label for="voice">Record a sample of your voice:</label>
<label for="picture">Take a picture using back facing camera:</label>

<input type="file" name="voice" accept="audio/*" capture />
<input type="file" id="picture" name="picture" accept="image/*" capture="environment" />
2 changes: 1 addition & 1 deletion live-examples/js-examples/proxyhandler/proxyhandler-get.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const monster1 = {
const handler1 = {
get: function (target, prop, receiver) {
if (prop === 'secret') {
return `${target.secret.substr(0, 4)} ... shhhh!`;
return `${target.secret.substring(0, 4)} ... shhhh!`;
}
return Reflect.get(...arguments);
},
Expand Down
2 changes: 1 addition & 1 deletion live-examples/js-examples/statement/statement-const.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ try {
number = 99;
} catch (err) {
console.log(err);
// Expected output: TypeError: invalid assignment to const `number'
// Expected output: TypeError: invalid assignment to const 'number'
// (Note: the exact output may be browser-dependent)
}

Expand Down
2 changes: 1 addition & 1 deletion live-examples/js-examples/symbol/symbol-split.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Split1 {
}
[Symbol.split](string) {
const index = string.indexOf(this.value);
return `${this.value}${string.substr(0, index)}/${string.substr(
return `${this.value}${string.substring(0, index)}/${string.substring(
index + this.value.length,
)}`;
}
Expand Down
2 changes: 1 addition & 1 deletion live-examples/media/examples/firefox-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions live-examples/media/examples/mdn.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion live-examples/media/examples/rain.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions live-examples/media/examples/shadow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion live-examples/wat-examples/numeric/abs.wat
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

)
(start $main)
)
)
4 changes: 2 additions & 2 deletions live-examples/wat-examples/numeric/copysign.wat
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
(module
(import "console" "log" (func $log (param f32)))
(func $main
;; load `10` and a negetive number onto the stack
;; load `10` and a negative number onto the stack
f32.const 10
f32.const -2

f32.copysign ;; copy just the sing bit from second to the first number
call $log ;; log the result
)
(start $main)
)
)
2 changes: 1 addition & 1 deletion live-examples/wat-examples/numeric/max.wat
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
call $log ;; log the result
)
(start $main)
)
)
2 changes: 1 addition & 1 deletion live-examples/wat-examples/numeric/min.wat
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
call $log ;; log the result
)
(start $main)
)
)
2 changes: 1 addition & 1 deletion live-examples/wat-examples/numeric/popcnt.wat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
;; load the number onto the stack
local.get $num

;; coount the amount of 1s and return the result
;; count the amount of 1s and return the result
i32.popcnt
)

Expand Down
2 changes: 1 addition & 1 deletion live-examples/wat-examples/statements/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ await WebAssembly.instantiateStreaming(fetch(url)).then((result) => {
console.log(select_simple());
// Expected output: 20

// If the second parameter is zero, returns the first paramater (which may be an arbitrary JS value)
// If the second parameter is zero, returns the first parameter (which may be an arbitrary JS value)
const map = new Map();
console.log(select_externref(map, 0));
// Expected output: [object Map]
Expand Down

0 comments on commit c877595

Please sign in to comment.