@@ -268,7 +268,7 @@ class IntersectionObserverTest extends React.Component {
268268 this . observer = undefined
269269 }
270270 this . observer = this . createIntersectionObserver ( data )
271- TestConsole . consoleResult . call ( this , this . observer , apiIndex )
271+ TestConsole . consoleResult . call ( this , "createIntersectionObserver:ok" , apiIndex )
272272 } ,
273273 } ,
274274 {
@@ -282,8 +282,8 @@ class IntersectionObserverTest extends React.Component {
282282 this . observer . disconnect ( )
283283 }
284284 this . observer = this . createIntersectionObserver ( )
285- this . observer . relativeTo ( '.scroll-view ' , data ) . observe ( '.ball' , ( res ) => {
286- TestConsole . consoleOnCallback . call ( this , res , 'IntersectionObserver.observe ' , apiIndex )
285+ this . observer . relativeTo ( '#IntersectionObserver ' , data ) . observe ( '.ball' , ( res ) => {
286+ TestConsole . consoleOnCallback . call ( this , res , 'IntersectionObserver.relativeTo ' , apiIndex )
287287 this . setState ( {
288288 appear : res . intersectionRatio > 0 ,
289289 } )
@@ -296,13 +296,13 @@ class IntersectionObserverTest extends React.Component {
296296 left : 0 ,
297297 } ,
298298 func : ( apiIndex , data ) => {
299- TestConsole . consoleTest ( 'IntersectionObserver.relativeTo ' )
299+ TestConsole . consoleTest ( 'IntersectionObserver.relativeToViewport ' )
300300 if ( this . observer ) {
301301 this . observer . disconnect ( )
302302 }
303303 this . observer = this . createIntersectionObserver ( )
304304 this . observer . relativeToViewport ( data ) . observe ( '.ball' , ( res ) => {
305- TestConsole . consoleOnCallback . call ( this , res , 'IntersectionObserver.observe ' , apiIndex )
305+ TestConsole . consoleOnCallback . call ( this , res , 'IntersectionObserver.relativeToViewport ' , apiIndex )
306306 this . setState ( {
307307 appear : res . intersectionRatio > 0 ,
308308 } )
@@ -338,7 +338,7 @@ class IntersectionObserverTest extends React.Component {
338338 return (
339339 < View >
340340 < View style = { { fontSize : '30px' , textAlign : 'center' } } > IntersectionObserver测试</ View >
341- < ScrollView className = 'scroll-view' scrollY >
341+ < ScrollView id = 'IntersectionObserver' className = 'scroll-view' scrollY >
342342 < View className = 'scroll-area' style = { { background : appear ? '#0f0' : '' } } >
343343 < Text className = 'notice' > 先创建IntersectionObserver再滚动</ Text >
344344 < View className = 'filling' > </ View >
0 commit comments