|
1 | 1 | /* @flow */
|
2 | 2 | declare var document: Object;
|
3 | 3 |
|
4 |
| -import { makeMap } from 'shared/util' |
5 | 4 | import { warn } from 'core/util/index'
|
6 | 5 |
|
7 | 6 | export const RECYCLE_LIST_MARKER = '@inRecycleList'
|
8 | 7 |
|
9 |
| -export const isReservedTag = makeMap( |
10 |
| - 'template,script,style,element,content,slot,link,meta,svg,view,' + |
11 |
| - 'a,div,img,image,text,span,input,switch,textarea,spinner,select,' + |
12 |
| - 'slider,slider-neighbor,indicator,canvas,' + |
13 |
| - 'list,cell,header,loading,loading-indicator,refresh,scrollable,scroller,' + |
14 |
| - 'video,web,embed,tabbar,tabheader,datepicker,timepicker,marquee,countdown', |
15 |
| - true |
16 |
| -) |
17 |
| - |
18 |
| -// Elements that you can, intentionally, leave open (and which close themselves) |
19 |
| -// more flexible than web |
20 |
| -export const canBeLeftOpenTag = makeMap( |
21 |
| - 'web,spinner,switch,video,textarea,canvas,' + |
22 |
| - 'indicator,marquee,countdown', |
23 |
| - true |
24 |
| -) |
25 |
| - |
26 |
| -export const isRuntimeComponent = makeMap( |
27 |
| - 'richtext,transition,transition-group', |
28 |
| - true |
29 |
| -) |
30 |
| - |
31 |
| -export const isUnaryTag = makeMap( |
32 |
| - 'embed,img,image,input,link,meta', |
33 |
| - true |
34 |
| -) |
35 |
| - |
36 |
| -export function mustUseProp (tag: string, type: ?string, name: string): boolean { |
37 |
| - return false |
38 |
| -} |
39 |
| - |
40 |
| -export function getTagNamespace (tag?: string): string | void { } |
41 |
| - |
42 |
| -export function isUnknownElement (tag?: string): boolean { |
43 |
| - return false |
44 |
| -} |
45 |
| - |
46 |
| -export function query (el: string | Element, document: Object) { |
47 |
| - // document is injected by weex factory wrapper |
48 |
| - const placeholder = document.createComment('root') |
49 |
| - placeholder.hasAttribute = placeholder.removeAttribute = function () {} // hack for patch |
50 |
| - document.documentElement.appendChild(placeholder) |
51 |
| - return placeholder |
52 |
| -} |
53 |
| - |
54 | 8 | // Register the component hook to weex native render engine.
|
55 | 9 | // The hook will be triggered by native, not javascript.
|
56 | 10 | export function registerComponentHook (
|
|
0 commit comments