aboutsummaryrefslogtreecommitdiff
path: root/node_modules/vue/src/platforms/weex/util/element.js
diff options
context:
space:
mode:
authorruki <waruqi@gmail.com>2018-11-08 00:38:48 +0800
committerruki <waruqi@gmail.com>2018-11-07 21:53:09 +0800
commit26105034da4fcce7ac883c899d781f016559310d (patch)
treec459a5dc4e3aa0972d9919033ece511ce76dd129 /node_modules/vue/src/platforms/weex/util/element.js
parent2c77f00f1a7ecb6c8192f9c16d3b2001b254a107 (diff)
downloadxmake-docs-26105034da4fcce7ac883c899d781f016559310d.tar.gz
xmake-docs-26105034da4fcce7ac883c899d781f016559310d.zip
switch to vuepress
Diffstat (limited to 'node_modules/vue/src/platforms/weex/util/element.js')
-rw-r--r--node_modules/vue/src/platforms/weex/util/element.js52
1 files changed, 52 insertions, 0 deletions
diff --git a/node_modules/vue/src/platforms/weex/util/element.js b/node_modules/vue/src/platforms/weex/util/element.js
new file mode 100644
index 00000000..97e97feb
--- /dev/null
+++ b/node_modules/vue/src/platforms/weex/util/element.js
@@ -0,0 +1,52 @@
+/* @flow */
+
+// These util functions are split into its own file because Rollup cannot drop
+// makeMap() due to potential side effects, so these variables end up
+// bloating the web builds.
+
+import { makeMap } from 'shared/util'
+
+export const isReservedTag = makeMap(
+ 'template,script,style,element,content,slot,link,meta,svg,view,' +
+ 'a,div,img,image,text,span,input,switch,textarea,spinner,select,' +
+ 'slider,slider-neighbor,indicator,canvas,' +
+ 'list,cell,header,loading,loading-indicator,refresh,scrollable,scroller,' +
+ 'video,web,embed,tabbar,tabheader,datepicker,timepicker,marquee,countdown',
+ true
+)
+
+// Elements that you can, intentionally, leave open (and which close themselves)
+// more flexible than web
+export const canBeLeftOpenTag = makeMap(
+ 'web,spinner,switch,video,textarea,canvas,' +
+ 'indicator,marquee,countdown',
+ true
+)
+
+export const isRuntimeComponent = makeMap(
+ 'richtext,transition,transition-group',
+ true
+)
+
+export const isUnaryTag = makeMap(
+ 'embed,img,image,input,link,meta',
+ true
+)
+
+export function mustUseProp (tag: string, type: ?string, name: string): boolean {
+ return false
+}
+
+export function getTagNamespace (tag?: string): string | void { }
+
+export function isUnknownElement (tag?: string): boolean {
+ return false
+}
+
+export function query (el: string | Element, document: Object) {
+ // document is injected by weex factory wrapper
+ const placeholder = document.createComment('root')
+ placeholder.hasAttribute = placeholder.removeAttribute = function () {} // hack for patch
+ document.documentElement.appendChild(placeholder)
+ return placeholder
+}