OLD | NEW |
---|---|
(Empty) | |
1 /* Copyright 2017 The Chromium Authors. All rights reserved. | |
2 * Use of this source code is governed by a BSD-style license that can be | |
3 * found in the LICENSE file. | |
4 * | |
5 * TODO(dproctor): This works only for JSON-LD data. If we want to support other | |
6 * data formats, such as Microdata, RDF, etc. we'll need to include a parsing | |
7 * library. | |
8 */ | |
9 var a=document.querySelectorAll("script[type=\"application/ld+json\"]");if(a){ v ar b=[];a.forEach(function(s) {b.push(JSON.parse(s.innerHTML)) });b; } | |
wychen
2017/02/13 22:08:06
A few corner cases we might want to handle:
{
"
dproctor
2017/02/13 23:11:57
Hey, thanks for raising the issue. I didn't see an
wychen
2017/02/13 23:44:31
I think flattening sounds nice, but then it would
| |
OLD | NEW |