#include "third_party/blink/renderer/core/script/detect_javascript_frameworks.h"
#include "base/feature_list.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/loader/javascript_framework_detection.h"
#include "third_party/blink/public/common/loader/loading_behavior_flag.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/dom/element_traversal.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/local_frame_client.h"
#include "third_party/blink/renderer/core/html/html_head_element.h"
#include "third_party/blink/renderer/core/html/html_meta_element.h"
#include "third_party/blink/renderer/platform/bindings/dom_wrapper_world.h"
#include "third_party/blink/renderer/platform/bindings/v8_binding.h"
#include "third_party/blink/renderer/platform/wtf/std_lib_extras.h"
#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"
#include "v8/include/v8.h"
namespace blink {
namespace {
constexpr char kGatsbyId[] = …;
constexpr char kNextjsData[] = …;
constexpr char kNuxtjsData[] = …;
constexpr char kSapperData[] = …;
constexpr char kVuepressData[] = …;
constexpr char kShopify[] = …;
constexpr char kSquarespace[] = …;
bool IsFrameworkVariableUsed(v8::Local<v8::Context> context,
const String& framework_variable_name) { … }
bool IsFrameworkIDUsed(Document& document, const AtomicString& framework_id) { … }
inline void CheckIdMatches(Document& document,
JavaScriptFrameworkDetectionResult& result) { … }
inline void CheckAttributeMatches(const Element& element,
JavaScriptFrameworkDetectionResult& result,
AtomicString& detected_ng_version) { … }
inline void CheckPropertyMatches(Element& element,
DOMDataStore& dom_data_store,
v8::Local<v8::Context> context,
v8::Isolate* isolate,
JavaScriptFrameworkDetectionResult& result) { … }
inline void CheckGlobalPropertyMatches(
v8::Local<v8::Context> context,
v8::Isolate* isolate,
JavaScriptFrameworkDetectionResult& result) { … }
int64_t ExtractVersion(v8::Local<v8::RegExp> regexp,
v8::Local<v8::Context> context,
v8::Local<v8::Value> version) { … }
void DetectFrameworkVersions(Document& document,
v8::Local<v8::Context> context,
v8::Isolate* isolate,
JavaScriptFrameworkDetectionResult& result,
const AtomicString& detected_ng_version) { … }
void TraverseTreeForFrameworks(Document& document,
v8::Isolate* isolate,
v8::Local<v8::Context> context) { … }
}
void DetectJavascriptFrameworksOnLoad(Document& document) { … }
}