fix(learn): colored markers - step 5 - validation (#47808)
parent
4f005bf3e2
commit
1ba9624b5c
|
@ -28,7 +28,8 @@ Your new `meta` element should have a `name` attribute set to `viewport`, and a
|
|||
|
||||
```js
|
||||
const meta = [...document.querySelectorAll('meta')];
|
||||
const target = meta?.find(m => m?.getAttribute('name') === 'viewport' && m?.getAttribute('content') === 'width=device-width, initial-scale=1.0');
|
||||
const reValidContent = /^\s*width\s*=\s*device-width\s*,\s*initial-scale\s*=\s*1(?:\.0)?\s*$/;
|
||||
const target = meta?.find(m => m?.getAttribute('name') === 'viewport' && reValidContent.test(m?.getAttribute('content')));
|
||||
assert.exists(target);
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue