File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -361,22 +361,30 @@ const inject = {
361361 * Extract modifiers such as ::element or ::after.
362362 * Ensure that a target element exists.
363363 */
364+
364365 if ( cfg . url !== url ) {
365366 // in case of multi-injection, all injections need to use
366367 // the same url
367368 log . error ( "Unsupported different urls for multi-inject" ) ;
368369 return false ;
369370 }
371+
370372 // defaults
371373 cfg . source = cfg . source || cfg . defaultSelector ;
372374 cfg . target = cfg . target || cfg . defaultSelector ;
373375
376+ // Extract modifiers like ::element, ::before, ::after. These need to
377+ // be extracted before `ensureTarget` so that the CSS selectors are
378+ // fixed.
374379 if ( ! this . extractModifiers ( cfg ) ) {
375380 return false ;
376381 }
382+
383+ // Check, if the target can be found in the document to inject into.
377384 if ( ! this . ensureTarget ( cfg ) ) {
378385 return false ;
379386 }
387+
380388 this . listenForFormReset ( cfg ) ;
381389 return true ;
382390 } ,
You can’t perform that action at this time.
0 commit comments